re PR rtl-optimization/7145 (g++ -O with structure initializer & return value optimization generates bad code)

PR optimization/7145
        * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.

From-SVN: r55261
This commit is contained in:
Jason Merrill 2002-07-05 11:01:04 -04:00 committed by Jason Merrill
parent 5974630302
commit 98c07d7bd7
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-07-05 Jason Merrill <jason@redhat.com>
PR optimization/7145
* tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
2002-07-05 Nathan Sidwell <nathan@codesourcery.com>
Repair damage on weak-impared targets caused by my previous patch.
@ -555,6 +560,7 @@
2002-05-18 Jason Merrill <jason@redhat.com>
PR c++/6611
* decl2.c (import_export_decl): If we clear
DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.

View File

@ -2292,6 +2292,7 @@ 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);
DECL_INITIAL (var) = DECL_INITIAL (nrv);
splay_tree_insert (decl_map,
(splay_tree_key) nrv,
(splay_tree_value) var);