https://gcc.gnu.org/g:67431721378391be7cb774c789a8da10c0f827ee
commit r16-8437-g67431721378391be7cb774c789a8da10c0f827ee Author: Christopher Albert <[email protected]> Date: Wed Mar 11 00:21:27 2026 +0100 fortran: Add testcase [PR95163] The reproducer from the bug report now gives a proper error on current trunk instead of an ICE. Add a testcase to prevent future regressions. PR fortran/95163 gcc/testsuite/ChangeLog: PR fortran/95163 * gfortran.dg/gomp/pr95163.f90: New test. Signed-off-by: Christopher Albert <[email protected]> Diff: --- gcc/testsuite/gfortran.dg/gomp/pr95163.f90 | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gcc/testsuite/gfortran.dg/gomp/pr95163.f90 b/gcc/testsuite/gfortran.dg/gomp/pr95163.f90 new file mode 100644 index 000000000000..e64e9437b0ba --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/pr95163.f90 @@ -0,0 +1,13 @@ +! { dg-do compile } +! PR fortran/95163 +! Contributed by John Donners <[email protected]> +! +! ICE in gimplify_adjust_omp_clauses with map and firstprivate on same +! variable. + + integer :: i + i = 1 +!$omp target map(tofrom: i) firstprivate (i) ! { dg-error "present on both data and map clauses" } + i = i + 1 +!$omp end target +end
