Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/declare-variant-15.f90

raw
1 ! { dg-do compile }
2 ! { dg-additional-options "-fdump-tree-gimple" }
3
4 ! Test 'declare variant' directive with an explicit base procedure name.
5
6 module main
7 implicit none
8
9 !$omp declare variant (base: variant) match (construct={target,parallel})
10 contains
11 subroutine variant ()
12 end subroutine
13
14 subroutine base ()
15 end subroutine
16
17 subroutine variant2 ()
18 end subroutine
19
20 subroutine base2 ()
21 !$omp declare variant (base2: variant2) match (construct={parallel})
22 end subroutine
23
24 subroutine test1 ()
25 !$omp target
26 !$omp parallel
27 call base () ! { dg-final { scan-tree-dump-times "variant \\\(\\\);" 1 "gimple" } }
28 !$omp end parallel
29 !$omp end target
30 end subroutine
31
32 subroutine test2 ()
33 !$omp parallel
34 call base2 () ! { dg-final { scan-tree-dump-times "variant2 \\\(\\\);" 1 "gimple" } }
35 !$omp end parallel
36 end subroutine
37 end module