diff --git a/tccgen.c b/tccgen.c index c6edcc3f..6c341e0c 100644 --- a/tccgen.c +++ b/tccgen.c @@ -995,7 +995,8 @@ static Sym *external_sym(int v, CType *type, int r, AttributeDef *ad) { Sym *s; s = sym_find(v); - if (!s || (!(s->type.t & VT_EXTERN) && (s->type.t & VT_BTYPE) != VT_FUNC)) { + if (!s || (!IS_ASM_SYM(s) && !(s->type.t & VT_EXTERN) + && (s->type.t & VT_BTYPE) != VT_FUNC)) { if (s && !is_compatible_types(&s->type, type)) tcc_error("conflicting types for '%s'", get_tok_str(s->v, NULL)); /* push forward reference */