https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95163
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org Component|middle-end |fortran --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Reduced testcase: integer :: i i = 1 !$omp target map(tofrom: i) firstprivate (i) i = i + 1 !$omp end target end For C/C++, void foo (int i) { #pragma omp target map(tofrom: i) firstprivate (i) i++; } void bar (int i) { #pragma omp target firstprivate (i) map(tofrom: i) i++; } is rejected already in the FE, so I think we just miss rejecting it in the Fortran FE.