error: array section does not specify contiguous storage

I thought the code like below should compile with Clang:

int *p;
p = new int
[1024];
for (int i=0;i<1024;i++)
p[i] = new int[1024];
#pragma omp target parallel for map(p[0:1024][0:1024]) reduction(+: sum)

… but I get a build-time error. Is this expected even in the recent trunk?

Yes, because this is not contiguous array section.

Best regards,
Alexey Bataev

No way to map this array of pointers then?

For now you need a second map in a for loop, something like:

#map outer
for (...)
  #map inner array

better syntactic support might make it in 5.1.