1 ! RUN: %python %S/test_errors.py %s %flang_fc1
3 integer, intent(in) :: n
4 integer, device, intent(in) :: m(n)
5 real, device, intent(in) :: a(n)
6 logical, device, intent(in) :: l(n)
10 !$cuf kernel do <<<*,*>>> reduce (+:mr,ar)
11 do j=1,n; mr = mr + m(j); ar = ar + a(j); end do
12 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type LOGICAL(4)
13 !$cuf kernel do <<<*,*>>> reduce (+:lr)
15 !$cuf kernel do <<<*,*>>> reduce (*:mr,ar)
16 do j=1,n; mr = mr * m(j); ar = ar * a(j); end do
17 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type LOGICAL(4)
18 !$cuf kernel do <<<*,*>>> reduce (*:lr)
20 !$cuf kernel do <<<*,*>>> reduce (max:mr,ar)
21 do j=1,n; mr = max(mr,m(j)); ar = max(ar,a(j)); end do
22 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type LOGICAL(4)
23 !$cuf kernel do <<<*,*>>> reduce (max:lr)
25 !$cuf kernel do <<<*,*>>> reduce (min:mr,ar)
26 do j=1,n; mr = min(mr,m(j)); ar = min(ar,a(j)); end do
27 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type LOGICAL(4)
28 !$cuf kernel do <<<*,*>>> reduce (min:lr)
30 !$cuf kernel do <<<*,*>>> reduce (iand:mr)
31 do j=1,n; mr = iand(mr,m(j)); end do
32 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type REAL(4)
33 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type LOGICAL(4)
34 !$cuf kernel do <<<*,*>>> reduce (iand:ar,lr)
36 !$cuf kernel do <<<*,*>>> reduce (ieor:mr)
37 do j=1,n; mr = ieor(mr,m(j)); end do
38 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type REAL(4)
39 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type LOGICAL(4)
40 !$cuf kernel do <<<*,*>>> reduce (ieor:ar,lr)
42 !$cuf kernel do <<<*,*>>> reduce (ior:mr)
43 do j=1,n; mr = ior(mr,m(j)); end do
44 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type REAL(4)
45 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type LOGICAL(4)
46 !$cuf kernel do <<<*,*>>> reduce (ior:ar,lr)
48 !$cuf kernel do <<<*,*>>> reduce (.and.:lr)
49 do j=1,n; lr = lr .and. l(j); end do
50 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type INTEGER(4)
51 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type REAL(4)
52 !$cuf kernel do <<<*,*>>> reduce (.and.:mr,ar)
54 !$cuf kernel do <<<*,*>>> reduce (.eqv.:lr)
55 do j=1,n; lr = lr .eqv. l(j); end do
56 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type INTEGER(4)
57 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type REAL(4)
58 !$cuf kernel do <<<*,*>>> reduce (.eqv.:mr,ar)
60 !$cuf kernel do <<<*,*>>> reduce (.neqv.:lr)
61 do j=1,n; lr = lr .neqv. l(j); end do
62 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type INTEGER(4)
63 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type REAL(4)
64 !$cuf kernel do <<<*,*>>> reduce (.neqv.:mr,ar)
66 !$cuf kernel do <<<*,*>>> reduce (.or.:lr)
67 do j=1,n; lr = lr .or. l(j); end do
68 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type INTEGER(4)
69 !ERROR: !$CUF KERNEL DO REDUCE operation is not acceptable for a variable with type REAL(4)
70 !$cuf kernel do <<<*,*>>> reduce (.or.:mr,ar)