Fix vla support for arrays with no size
This commit is contained in:
parent
aea68dbb40
commit
a5588501ab
1 changed files with 1 additions and 1 deletions
2
tccgen.c
2
tccgen.c
|
|
@ -8638,7 +8638,7 @@ static void func_vla_arg_code(Sym *arg)
|
||||||
if (arg->type.ref)
|
if (arg->type.ref)
|
||||||
func_vla_arg_code(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 -= type_size(&int_type, &align);
|
||||||
loc &= -align;
|
loc &= -align;
|
||||||
arg->type.ref->c = loc;
|
arg->type.ref->c = loc;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue