diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2003-05-22 19:39:13 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2003-05-22 15:39:13 -0400 |
commit | 29495994694b728b6461b9d6ece5e129d6ca6b7f (patch) | |
tree | 24a363432f7a7159c5a99f0a4cedf48ca9ecf40f /gcc/c-decl.c | |
parent | 0aef8de2ae87424b237fa4905d575f4055514ed7 (diff) | |
download | gcc-29495994694b728b6461b9d6ece5e129d6ca6b7f.zip gcc-29495994694b728b6461b9d6ece5e129d6ca6b7f.tar.gz gcc-29495994694b728b6461b9d6ece5e129d6ca6b7f.tar.bz2 |
* c-decl.c (duplicate_decls): Test DECL for ERROR_MARK.
From-SVN: r67096
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index f6e6f5b..6eb0f55 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -1543,6 +1543,7 @@ duplicate_decls (newdecl, olddecl, different_binding_level) /* Return any external DECL associated with ID, whether or not it is currently in scope. */ + static tree any_external_decl (id) tree id; @@ -1550,7 +1551,9 @@ any_external_decl (id) tree decl = IDENTIFIER_SYMBOL_VALUE (id); tree t; - if (decl && TREE_CODE (decl) != TYPE_DECL && DECL_EXTERNAL (decl)) + if (decl == 0 || TREE_CODE (decl) == ERROR_MARK) + return 0; + else if (TREE_CODE (decl) != TYPE_DECL && DECL_EXTERNAL (decl)) return decl; t = purpose_member (id, truly_local_externals); |