diff options
author | Richard Henderson <rth@redhat.com> | 2003-05-13 22:40:12 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2003-05-13 22:40:12 -0700 |
commit | 2306d91c5cc44948ef69842cda73c3def11381f7 (patch) | |
tree | 162eb1a3ac2dbba325e86b29aabca6f8b9195f57 /gcc/c-decl.c | |
parent | 979c310f5e2c6adc19b136cd4f0fa1d538326d29 (diff) | |
download | gcc-2306d91c5cc44948ef69842cda73c3def11381f7.zip gcc-2306d91c5cc44948ef69842cda73c3def11381f7.tar.gz gcc-2306d91c5cc44948ef69842cda73c3def11381f7.tar.bz2 |
c-decl.c (duplicate_decls): Re-invoke make_decl_rtl if the old decl had instantiated DECL_RTL.
* c-decl.c (duplicate_decls): Re-invoke make_decl_rtl if
the old decl had instantiated DECL_RTL.
From-SVN: r66798
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index b27ca06..28ba643 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; } |