Commit 34902e16 by Jason Merrill Committed by Jason Merrill

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
parent 25c25947
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment