mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-19 12:19:40 +08:00
re PR c++/7279 (NRV related miscompilation)
PR c++/7279 * tree.c (cp_copy_res_decl_for_inlining): Also copy TREE_ADDRESSABLE. From-SVN: r55405
This commit is contained in:
parent
25c2594701
commit
34902e16e2
@ -1,3 +1,9 @@
|
||||
2002-07-11 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/7279
|
||||
* tree.c (cp_copy_res_decl_for_inlining): Also copy
|
||||
TREE_ADDRESSABLE.
|
||||
|
||||
2002-07-10 Graham Stott <graham.stott@btinternet.com>
|
||||
|
||||
* pt.c (template_parm_this_level_p, push_template_decl_real):
|
||||
|
@ -2292,7 +2292,11 @@ cp_copy_res_decl_for_inlining (result, fn, caller, decl_map_,
|
||||
DECL_SOURCE_FILE (var) = DECL_SOURCE_FILE (nrv);
|
||||
DECL_SOURCE_LINE (var) = DECL_SOURCE_LINE (nrv);
|
||||
DECL_ABSTRACT_ORIGIN (var) = DECL_ORIGIN (nrv);
|
||||
/* Don't lose initialization info. */
|
||||
DECL_INITIAL (var) = DECL_INITIAL (nrv);
|
||||
/* Don't forget that it needs to go in the stack. */
|
||||
TREE_ADDRESSABLE (var) = TREE_ADDRESSABLE (nrv);
|
||||
|
||||
splay_tree_insert (decl_map,
|
||||
(splay_tree_key) nrv,
|
||||
(splay_tree_value) var);
|
||||
|
Loading…
Reference in New Issue
Block a user