Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/declare-variant-mod-2-use.f90

raw
1 ! { dg-do compile { target skip-all-targets } }
2 ! used by declare-variant-mod-2.f90
3
4 ! Check that module-file handling works for declare_variant
5 ! and its match/adjust_args/append_args clauses
6 !
7 ! PR fortran/115271
8
9 ! THIS FILE PROCUEDES ERROR - SEE declare-variant-mod-2.f90 for dg-error lines
10
11 module m_test1
12 use m1, only: my_m1_f => m1_f, my_m1_g => m1_g
13 !$omp declare variant(my_m1_g : my_m1_f) match(construct={dispatch}) adjust_args(need_device_ptr: 1, 3) adjust_args(nothing: 1)
14 end
15
16 subroutine test1 ! See PR fortran/119288 - related to the following 'adjust_args' diagnostic
17 use m_test1 ! { dg-error "'x' at .1. is specified more than once" }
18 use iso_c_binding, only: c_ptr
19 implicit none (type, external)
20 type(c_ptr) :: a1,b1,c1
21 integer :: i
22 !$omp dispatch
23 i = my_m1_g(a1,b1,c1)
24 end
25
26 subroutine test2
27 use m2
28 implicit none (type, external)
29 integer :: i, t2_a1, t2_a2, t2_a3, t2_a4
30
31 call m2_g(t2_a1)
32
33 !$omp dispatch
34 call m2_g(t2_a2)
35
36 !$omp parallel if(.false.)
37 !$omp dispatch
38 call m2_g(t2_a3)
39 !$omp end parallel
40
41 !$omp do
42 do i = 1, 1
43 !$omp dispatch
44 call m2_g(t2_a4)
45 end do
46
47 end