debug metadata for variable length arrays ?

Is there any debug metadata to use for variable length arrays:

I picked this C example:

int vla(int n)


int aaa[n][n+3];

int i, j ;

for (i=0 ; i<n; i++)

for (j=0; j<n+3; j++)

aaa[i][j] = (i+j*n)%1023;

return aaa[n-1][0];


int main(int argc, char** argv)


return vla(argc+5);


How do I express range for ‘aaa’ array ?

I would need this for Fortran like languages where bounds can be defined as:

SUBROUTINE foo(x_min,x_max,y_min,y_max, &

aaa &



INTEGER :: x_min,x_max,y_min,y_max

REAL(KIND=8), DIMENSION(x_min-2:x_max+2,y_min-2:y_max+2) :: aaa

Any advice on how to use debug metadata to generate DWARF for those case is welcome.