diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-19 00:05:02 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-19 00:05:02 +0000 |
commit | 00149e9eaf8f3c697433e9a008a0a76a192d857e (patch) | |
tree | dd0761966bedc9539ddc35c9260a6937ff7712cb /gcc/c-decl.c | |
parent | 42c5089226b83c30401ba96bead190d74a491624 (diff) | |
download | gcc-00149e9eaf8f3c697433e9a008a0a76a192d857e.tar.gz |
* c-decl.c (duplicate_decls): Avoid setting TREE_ASM_WRITTEN for
duplicate declarations of a function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20569 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 62768e3ef68..51a18c5a0dd 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -2007,8 +2007,15 @@ duplicate_decls (newdecl, olddecl, different_binding_level) if (different_binding_level) { /* Don't output a duplicate symbol or debugging information for this - declaration. */ - TREE_ASM_WRITTEN (newdecl) = DECL_IGNORED_P (newdecl) = 1; + declaration. + + Do not set TREE_ASM_WRITTEN for a FUNCTION_DECL since we may actually + just have two declarations without a definition. VAR_DECLs may need + the same treatment, I'm not sure. */ + if (TREE_CODE (newdecl) == FUNCTION_DECL) + DECL_IGNORED_P (newdecl) = 1; + else + TREE_ASM_WRITTEN (newdecl) = DECL_IGNORED_P (newdecl) = 1; return 0; } |