Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/metadirective-8.f90

raw
1 ! { dg-do compile }
2
3 program test
4 integer :: i
5 integer, parameter :: N = 100
6 integer :: sum = 0
7
8 ! The compiler should never consider a situation where both metadirectives
9 ! match, but that does not matter because the spec says "Replacement of
10 ! the metadirective with the directive variant associated with any of the
11 ! dynamic replacement candidates must result in a conforming OpenMP
12 ! program. So the second metadirective is rejected as not being
13 ! a valid loop-nest even if the first one does not match.
14
15 !$omp metadirective when (implementation={vendor("ibm")}: &
16 !$omp& target teams distribute)
17 !$omp metadirective when (implementation={vendor("gnu")}: parallel do) ! { dg-error "Unexpected !.OMP METADIRECTIVE statement" }
18 do i = 1, N
19 sum = sum + i
20 end do
21 end program
22