diff options
author | Jeffrey A Law <law@cygnus.com> | 1998-06-19 00:05:02 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-06-18 18:05:02 -0600 |
commit | 11346e893f3e457232ad4597eb69d5355c2274f7 (patch) | |
tree | dd0761966bedc9539ddc35c9260a6937ff7712cb /gcc/c-decl.c | |
parent | af39d8f5438acbbda5b23738afa2542f10b36c66 (diff) | |
download | gcc-11346e893f3e457232ad4597eb69d5355c2274f7.zip gcc-11346e893f3e457232ad4597eb69d5355c2274f7.tar.gz gcc-11346e893f3e457232ad4597eb69d5355c2274f7.tar.bz2 |
c-decl.c (duplicate_decls): Avoid setting TREE_ASM_WRITTEN for duplicate declarations of a function.
* c-decl.c (duplicate_decls): Avoid setting TREE_ASM_WRITTEN for
duplicate declarations of a function.
From-SVN: r20569
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 62768e3..51a18c5 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; } |