https://bugs.winehq.org/show_bug.cgi?id=53767
--- Comment #11 from Jason Millard jsm174@gmail.com --- I think with the current approach ctx->func->array_descs is getting corrupted. I think it would need to grow or realloc, but couldn't figure out array_id.
I traced how this works:
Dim d Redim d(10)
I then simplified what you had to this:
if(ref.type != REF_VAR) { ref.type = REF_VAR; hres = add_dynamic_var(ctx, identifier, FALSE, &ref.u.v); }
hres = array_bounds_from_stack(ctx, dim_cnt, &bounds); if(FAILED(hres)) return hres;
. . .
Somehow this is working, but obviously I could be missing something.