]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/5998 (regression, all builtins disabled)
authorRoger Sayle <roger@eyesopen.com>
Mon, 1 Apr 2002 16:32:59 +0000 (16:32 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Mon, 1 Apr 2002 16:32:59 +0000 (16:32 +0000)
PR c++/5998:
* decl.c (duplicate_decls):  Overwrite the RTL when (and only
when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
but follow the SET_DECL_RTL idiom used elsewhere in the function.

From-SVN: r51690

gcc/cp/ChangeLog
gcc/cp/decl.c

index 024176e8e4faf568e1b3680ea40c0bf18dbd21bf..6f5c203e6de3385fd2485f52c7a28f3d732f1932 100644 (file)
@@ -1,3 +1,10 @@
+2002-04-01  Roger Sayle  <roger@eyesopen.com>
+
+       PR c++/5998:
+       * decl.c (duplicate_decls):  Overwrite the RTL when (and only
+       when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
+       but follow the SET_DECL_RTL idiom used elsewhere in the function.
+
 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
index e708a6de197981f5aae49728bddc047d4b58ec0c..5ac75fcf615c892b8605e506507364be7add624b 100644 (file)
@@ -3202,6 +3202,9 @@ duplicate_decls (newdecl, olddecl)
          else
            /* Discard the old built-in function.  */
            return 0;
+
+         /* Replace the old RTL to avoid problems with inlining.  */
+         SET_DECL_RTL (olddecl, DECL_RTL (newdecl));
        }
 
       if (DECL_THIS_STATIC (newdecl) && !DECL_THIS_STATIC (olddecl))
@@ -3623,7 +3626,6 @@ duplicate_decls (newdecl, olddecl)
       TREE_READONLY (olddecl) = TREE_READONLY (newdecl);
       TREE_THIS_VOLATILE (olddecl) = TREE_THIS_VOLATILE (newdecl);
       TREE_SIDE_EFFECTS (olddecl) = TREE_SIDE_EFFECTS (newdecl);
-      COPY_DECL_RTL (newdecl, olddecl);
     }
 
   /* Merge the storage class information.  */