aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2002-04-01 16:32:59 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2002-04-01 16:32:59 +0000
commit04a9d0805e2480b9a7579bd30d389cbd2fee784a (patch)
tree719cd61ff21163ca60229577877ddaca9b238980 /gcc
parentd5ecb9cb6c2c26516896139b145ae905624adced (diff)
downloadgcc-04a9d0805e2480b9a7579bd30d389cbd2fee784a.zip
gcc-04a9d0805e2480b9a7579bd30d389cbd2fee784a.tar.gz
gcc-04a9d0805e2480b9a7579bd30d389cbd2fee784a.tar.bz2
re PR c++/5998 (regression, all builtins disabled)
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/decl.c4
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 024176e..6f5c203 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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,
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index e708a6d..5ac75fc 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -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. */