aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-12-02 11:18:22 -0800
committerRichard Henderson <rth@gcc.gnu.org>2001-12-02 11:18:22 -0800
commit385d4094a47e46b162223895b329ec5575e6b9ae (patch)
treebafb63b8b05fb6dad15f3531c6ece90eb598aec8
parent998d7deb143c6511c68e21abb811af9f5524f89d (diff)
downloadgcc-385d4094a47e46b162223895b329ec5575e6b9ae.zip
gcc-385d4094a47e46b162223895b329ec5575e6b9ae.tar.gz
gcc-385d4094a47e46b162223895b329ec5575e6b9ae.tar.bz2
* c-decl.c (duplicate_decls): Conditionalize DECL_SAVED_TREE copy.
From-SVN: r47535
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/c-decl.c6
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f7c1b46..ba8d4c7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2001-12-02 Richard Henderson <rth@redhat.com>
+ * c-decl.c (duplicate_decls): Conditionalize DECL_SAVED_TREE copy.
+
+2001-12-02 Richard Henderson <rth@redhat.com>
+
* rtl.h (mem_attrs): Rename decl to expr; adjust all users.
(MEM_EXPR): Rename from MEM_DECL; adjust all users.
* emit-rtl.c (set_mem_expr): Rename from set_mem_decl.
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 6747593..619b9ae 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -2019,9 +2019,11 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
DECL_INITIAL, so that we don't accidentally change function
declarations into function definitions. */
if (! different_binding_level)
- DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
+ {
+ DECL_INITIAL (newdecl) = DECL_INITIAL (olddecl);
+ DECL_SAVED_TREE (newdecl) = DECL_SAVED_TREE (olddecl);
+ }
DECL_SAVED_INSNS (newdecl) = DECL_SAVED_INSNS (olddecl);
- DECL_SAVED_TREE (newdecl) = DECL_SAVED_TREE (olddecl);
DECL_ARGUMENTS (newdecl) = DECL_ARGUMENTS (olddecl);
if (DECL_INLINE (newdecl))
DECL_ABSTRACT_ORIGIN (newdecl) = DECL_ABSTRACT_ORIGIN (olddecl);