This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization/7145: [PATCH] g++ -O with structure initializer &return value optimization generates bad code


Here's the patch I'm applying.

2002-07-05  Jason Merrill  <jason@redhat.com>

	* tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.

*** tree.c.~1~	Tue Jul  2 14:56:10 2002
--- tree.c	Thu Jul  4 16:08:15 2002
*************** cp_copy_res_decl_for_inlining (result, f
*** 2292,2297 ****
--- 2292,2298 ----
  	  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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]