]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/7145 (g++ -O with structure initializer & return value optimiz...
authorJason Merrill <jason@redhat.com>
Fri, 5 Jul 2002 15:16:56 +0000 (11:16 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 5 Jul 2002 15:16:56 +0000 (11:16 -0400)
        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

gcc/cp/ChangeLog
gcc/cp/tree.c

index f7a26b9f0688feea393aef27e7a6507f9a55a245..1e677455725671fe861e1124c9efe6876ec699ed 100644 (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-05-18  Jason Merrill  <jason@redhat.com>
 
        PR c++/6611
index 98f897346bbbd9bcfaeb7700fb6ff4f8f097d32f..fc2b8e285f08731dd1aad659461d6b162012402b 100644 (file)
@@ -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);