aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2002-07-05 11:01:04 -0400
committerJason Merrill <jason@gcc.gnu.org>2002-07-05 11:01:04 -0400
commit98c07d7bd78d311fc95985791421bfde08f40a0b (patch)
treecab7035831e4efd9902a089c9236235a5af5001a /gcc
parent5974630302c95cfb900b7405a8497f585cdb2626 (diff)
downloadgcc-98c07d7bd78d311fc95985791421bfde08f40a0b.zip
gcc-98c07d7bd78d311fc95985791421bfde08f40a0b.tar.gz
gcc-98c07d7bd78d311fc95985791421bfde08f40a0b.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/tree.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a29f9ba..ab5c144 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 1fca146..b7b2123c 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -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);