From d00f98a7a53424c0077383301ed593825fef42eb Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sun, 7 Apr 2019 02:44:32 +0200 Subject: [PATCH] Fix 98_al_ax_extend.c compile error this test is run only on i386 so its failing went unnoticed for a while, since 1fd3709379. IS_ASM_SYMs should not be tested for conflicting types, the C typing overrides. --- tccgen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */