Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/requires-self-maps.f90

raw
1 ! { dg-do link }
2 ! { dg-additional-sources "requires-self-maps-aux.f90" }
3
4 module m
5 !$omp requires self_maps
6 implicit none
7 contains
8 integer function f()
9 !$omp target map(from:f)
10 f = 42
11 !$omp end target
12 end
13 end
14
15 ! This shows up in line 5 of requires-self-maps-aux.f90, but adding dg-error there is ignored when
16 ! invoked as additional files – but this file needs to come first in order to create the .mod file:
17 ! { dg-error "Program unit at .1. has OpenMP device constructs/routines but does not set !.OMP REQUIRES SELF_MAPS but other program units do" "" { target *-*-* } 0 }