Debian Codegraph @

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

raw
1 ! { dg-do compile }
2 ! { dg-additional-options "-fdump-tree-gimple" }
3
4 module main
5 implicit none
6 interface
7 integer function f0 ()
8 end function
9
10 integer function f1 ()
11 end function
12
13 integer function f2 ()
14 !$omp declare variant (f0) match (construct={dispatch})
15 !$omp declare variant (f1) match (implementation={vendor(gnu)})
16 end function
17 end interface
18 contains
19
20 integer function test ()
21 integer :: a
22
23 !$omp dispatch
24 a = f2 ()
25 !$omp dispatch novariants(.TRUE.)
26 a = f2 ()
27 !$omp dispatch novariants(.FALSE.)
28 a = f2 ()
29 !$omp dispatch nocontext(.TRUE.)
30 a = f2 ()
31 !$omp dispatch nocontext(.FALSE.)
32 a = f2 ()
33 end function
34 end module
35
36
37 ! { dg-final { scan-tree-dump-times "a = f0 \\\(\\\);" 3 "gimple" } }
38 ! { dg-final { scan-tree-dump-times "a = f1 \\\(\\\);" 1 "gimple" } }
39 ! { dg-final { scan-tree-dump-times "a = f2 \\\(\\\);" 1 "gimple" } }