diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-14 05:40:12 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-14 05:40:12 +0000 |
commit | 979e2687de7fcb92a1b39364206d02cda2f1dd25 (patch) | |
tree | 162eb1a3ac2dbba325e86b29aabca6f8b9195f57 | |
parent | 8ebb6b4dc7302467d0d8fe31babfe2dde2eb6172 (diff) | |
download | gcc-979e2687de7fcb92a1b39364206d02cda2f1dd25.tar.gz |
* c-decl.c (duplicate_decls): Re-invoke make_decl_rtl if
the old decl had instantiated DECL_RTL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66798 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/c-decl.c | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 16949faa98a..a384ca882c1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-05-13 Richard Henderson <rth@redhat.com> + + * c-decl.c (duplicate_decls): Re-invoke make_decl_rtl if + the old decl had instantiated DECL_RTL. + 2003-05-13 Mike Stump <mrs@apple.com> * doc/invoke.texi (Option Summary): Kill off documentation for -$. diff --git a/gcc/c-decl.c b/gcc/c-decl.c index b27ca06c79d..28ba6431767 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -1529,6 +1529,15 @@ duplicate_decls (newdecl, olddecl, different_binding_level) Update OLDDECL to be the same. */ DECL_ATTRIBUTES (olddecl) = DECL_ATTRIBUTES (newdecl); + /* If OLDDECL had its DECL_RTL instantiated, re-invoke make_decl_rtl + so that encode_section_info has a chance to look at the new decl + flags and attributes. */ + if (DECL_RTL_SET_P (olddecl) + && (TREE_CODE (olddecl) == FUNCTION_DECL + || (TREE_CODE (olddecl) == VAR_DECL + && TREE_STATIC (olddecl)))) + make_decl_rtl (olddecl, NULL); + return 1; } |