* c-decl.c (duplicate_decls): Test DECL for ERROR_MARK.

From-SVN: r67096
This commit is contained in:
Richard Kenner 2003-05-22 19:39:13 +00:00 committed by Richard Kenner
parent 0aef8de2ae
commit 2949599469
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2003-05-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* c-decl.c (duplicate_decls): Test DECL for ERROR_MARK.
2003-05-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* m68hc11.c: Don't use the `0' flag for asm_fprintf specifiers.

View File

@ -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);