summaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-22 19:39:13 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-22 19:39:13 +0000
commit5adfa4fe46b6e4115ba3065544208cd6103d7fab (patch)
tree24a363432f7a7159c5a99f0a4cedf48ca9ecf40f /gcc/c-decl.c
parentae9b5980268a25dd81f909c32c79727038827bfc (diff)
downloadgcc-5adfa4fe46b6e4115ba3065544208cd6103d7fab.tar.gz
* c-decl.c (duplicate_decls): Test DECL for ERROR_MARK.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67096 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index f6e6f5b52a7..6eb0f55fd25 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);