From a5588501ab5da5dd7af2e0e966cd21ace971746a Mon Sep 17 00:00:00 2001 From: herman ten brugge Date: Tue, 12 Apr 2022 07:03:33 +0200 Subject: [PATCH] Fix vla support for arrays with no size --- tccgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tccgen.c b/tccgen.c index ed417768..d1e0823a 100644 --- a/tccgen.c +++ b/tccgen.c @@ -8638,7 +8638,7 @@ static void func_vla_arg_code(Sym *arg) if (arg->type.ref) func_vla_arg_code(arg->type.ref); - if (arg->type.t & VT_VLA) { + if ((arg->type.t & VT_VLA) && arg->type.ref->vla_array_str) { loc -= type_size(&int_type, &align); loc &= -align; arg->type.ref->c = loc;