On 6/8/26 11:13, Tobias Burnus wrote:
[snip] If I try the attached program, an extended version of
   gcc/testsuite/gfortran.dg/gomp/target-map-iterators-5.f90

I noticed:

- If I use run-time bounds (this patch) the testcase
   'f2' segfaults at runtime - even without offloading
   enabled ('OMP_TARGET_OFFLOAD=disabled') or configured.
   (and likewise with offloading)

The const-bound version works ('h2').

I stripped down your test case to include nothing but the mapping code in f2, and looked at the .omplower dump. This looks similar to the segv I've been seeing in part 10 (deep mapping) test results; there is an uninitialized pointer temporary (in this case, an array descriptor) being dereferenced in setup before the element loop, that is not initialized until the loop body. This is with the full set of patches applied on mainline, but clearly the testcase has nothing to do with deep mapping and it's being introduced probably in part 6 if it's the same failure you're seeing. With the deep-mapping failure I was pretty stuck due to the near-total lack of comments describing what the generated code was supposed to look like, but maybe this one is simple enough that I can make more progress on it. It's probably something being added to the wrong gimple_seq somewhere.

-Sandra

Reply via email to