Debian Codegraph @

gcc/testsuite/gfortran.dg/gomp/masked-2.f90

raw
1 module m
2 implicit none (external, type)
3 type t
4 end type t
5 contains
6 subroutine foo (x, y, z, a)
7 external :: bar
8 type(t) :: x
9 integer :: y
10 real :: z
11 integer :: a(4)
12
13 !$omp masked filter (x) ! { dg-error "FILTER clause at .1. requires a scalar INTEGER expression" }
14 call bar ()
15 !$omp end masked
16
17 !$omp masked filter (y) ! OK
18 call bar ()
19 !$omp end masked
20
21 !$omp masked filter (z) ! { dg-error "FILTER clause at .1. requires a scalar INTEGER expression" }
22 call bar ()
23 !$omp end masked
24
25 !$omp masked filter (a) ! { dg-error "FILTER clause at .1. requires a scalar INTEGER expression" }
26 call bar ()
27 !$omp end masked
28
29 !$omp masked filter (0.0) ! { dg-error "FILTER clause at .1. requires a scalar INTEGER expression" }
30 call bar ()
31 !$omp end masked
32
33 !$omp masked filter ([1]) ! { dg-error "FILTER clause at .1. requires a scalar INTEGER expression" }
34 call bar ()
35 !$omp end masked
36
37 !$omp masked filter (-1) ! { dg-warning "INTEGER expression of FILTER clause at .1. must be non-negative" }
38 call bar ()
39 !$omp end masked
40 end
41 end module
42
43 subroutine bar
44 !$omp masked filter (0) filter (0) ! { dg-error "Duplicated 'filter' clause" }
45 call foobar
46 end