Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/adjust-args-6.f90

raw
1 ! { dg-do compile }
2
3 ! Check that duplicate adjust_args list items are reported
4
5 module m
6 use iso_c_binding
7 implicit none (type, external)
8 contains
9 subroutine foo(x,y)
10 type(C_ptr), value :: x, y
11 !$omp declare variant(bar) match ( construct = { dispatch } ) adjust_args(nothing : x ,y ) adjust_args(need_device_ptr : y ) !{ dg-error "'y' at .1. is specified more than once" }
12 end
13 subroutine bar(a,b)
14 type(C_ptr), value :: a, b ! OK
15 end
16 end