https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93554

--- Comment #16 from Christopher Albert <albert at tugraz dot at> ---
Created attachment 64265
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64265&action=edit
Follow-up: libgomp execution tests [PR93554, PR95550, PR107227]

Follow-up per Thomas Schwinge's review of r16-8571 on gcc-patches
(https://gcc.gnu.org/pipermail/gcc-patches/2026-April/713304.html):

Five libgomp execution tests staged at
libgomp/testsuite/libgomp.oacc-fortran/:

- pr93554-1.f90  -- derived type with allocatable component, five
  parallelism variants (gang/worker/vector/seq/kernels).
- pr93554-2.f90  -- derived type with allocatable component
  allocated inside the loop body, gang-only; forces the
  per-thread finaliser __nvptx_free to run on the device.
- pr93554-3.f90  -- whole allocatable private under num_gangs(4)
  gang partitioning; exercises per-gang isolation + free edge.
- pr95550-1.f90  -- Burnus's acc parallel create(A) + loop
  private(A); verifies host-side A unchanged after region.
- pr107227-1.f90 -- Bryngelson's acc parallel loop private(arr)
  on a whole real allocatable.

All pass on host fallback at six optimisation levels and on NVPTX
sm_89.  GOMP_DEBUG=1 shows __nvptx_malloc and __nvptx_free inside
the offload entry body: for pr93554-2 the free runs at region exit
on every thread; for pr93554-3 it runs per gang.

Proposed disposition: with PR95550 and PR107227 closed as DUPLICATE
of this bug now that shared execution coverage is in place.

Note: while validating the tests on NVPTX, I ran into a pre-existing
codegen issue for whole-allocatable privates under gang+worker+vector
partitioning on NVPTX (254/256 iterations return iter-1's value;
static-array variant works).  Filed separately as PR124964
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124964).  The fix
r16-8571 is pure assertion relaxation, so it cannot introduce this
miscompile -- it only exposes it because the old ICE used to block
the offending shape at compile time.  pr93554-2 and pr93554-3
therefore pin to gang-only partitioning.

Reply via email to