From: Jason Merrill Date: Fri, 5 Jul 2002 15:16:56 +0000 (-0400) Subject: re PR rtl-optimization/7145 (g++ -O with structure initializer & return value optimiz... X-Git-Tag: releases/gcc-3.1.1~53 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae059561139a008bb25325a08aeb342ce82999db;p=thirdparty%2Fgcc.git 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. [[Split portion of a mixed commit.]] From-SVN: r55262.1 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f7a26b9f0688..1e6774557256 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2002-07-05 Jason Merrill + + PR optimization/7145 + * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL. + 2002-05-18 Jason Merrill PR c++/6611 diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 98f897346bbb..fc2b8e285f08 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -2284,6 +2284,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);