Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/dispatch-6.f90

raw
1 ! { dg-do compile }
2
3 ! Check for proper error recovery in resolve_omp_dispatch
4
5 module m
6 use iso_c_binding
7 implicit none (type, external)
8 contains
9 subroutine foo(x,y)
10 !$omp declare variant(bar) match ( construct = { dispatch } )
11 type(C_ptr), value :: x, y
12 end
13 subroutine bar(a,b)
14 type(C_ptr), value :: a, b
15 end
16 end
17
18 use m
19 integer :: y, z
20 !$omp dispatch device(5)
21 call foo(c_loc(y),c_loc(z)) !{ dg-error "Argument X at .1. to C_LOC shall have either the POINTER or the TARGET attribute" }
22 end