Skip to content

Support multidimensional VLAs  #5

@michael-schwarz

Description

@michael-schwarz

One-dimensional VLAs are (kind of) supported via turning them into alloca calls.
But this fails for multidimensional arrays:

int main() {
  int x = 1;
  int y = 1;
  int m[x][y];

  m[0][0] = 0;
} 

leads to Error: Cannot resolve variable m.

Changing it to int m[x][1]; makes it work again.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions