https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90859
Bug ID: 90859 Summary: [OMP] Mappings for VLA different depending on 'target { c && { ! lp64 } }' Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: openacc Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org CC: jakub at gcc dot gnu.org Target Milestone: --- I noticed the following (with OpenACC, not yet tried to reproduce with OpenMP 'target'). Is there something wrong, or can that behavior be explained? Only 'sizeof array' appears in the offloaded region, yet for 'target { c && { ! lp64 } }' (only!), the gimplifier also creates a mapping for the array itself. static void vla (int array_li) { _Complex double array[array_li]; uint32_t array_so; #pragma acc parallel \ copyout (array_so) \ /* The gimplifier has created an implicit 'firstprivate' clause for the array length. { dg-final { scan-tree-dump {(?n)#pragma omp target oacc_parallel map\(from:array_so \[len: 4\]\) firstprivate\(} omplower } } */ \ /* For C, non-LP64, the gimplifier has also created a mapping for the array itself. { dg-final { scan-tree-dump {(?n)#pragma omp target oacc_parallel map\(from:array_so \[len: 4\]\) firstprivate\(array_li.[0-9]+\) map\(tofrom:\(\*array.[0-9]+\) \[len: D\.[0-9]+\]\) map\(firstprivate:array \[pointer assign, bias: 0\]\) \[} omplower { target { c && { ! lp64 } } } } } */ \ { array_so = sizeof array; } if (array_so != sizeof array) __builtin_abort (); }