2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gfortran.dg / gomp / reduction3.f90
blob0272a7415960e7cee6fb0031edf2fccc07dfbc2e
1 ! { dg-do compile }
3 module mreduction3
4 interface
5 function ior (a, b)
6 integer :: ior, a, b
7 end function
8 end interface
9 contains
10 function iand (a, b)
11 integer :: iand, a, b
12 iand = a + b
13 end function
14 end module mreduction3
15 subroutine f1
16 integer :: i, ior
17 ior = 6
18 i = 6
19 !$omp parallel reduction (ior:i) ! { dg-error "is not INTRINSIC procedure name" }
20 !$omp end parallel
21 end subroutine f1
22 subroutine f2
23 integer :: i
24 interface
25 function ior (a, b)
26 integer :: ior, a, b
27 end function
28 end interface
29 i = 6
30 !$omp parallel reduction (ior:i) ! { dg-error "is not INTRINSIC procedure name" }
31 i = ior (i, 3)
32 !$omp end parallel
33 end subroutine f2
34 subroutine f3
35 integer :: i
36 intrinsic ior
37 i = 6
38 !$omp parallel reduction (ior:i)
39 i = ior (i, 3)
40 !$omp end parallel
41 end subroutine f3
42 subroutine f4
43 integer :: i, ior
44 i = 6
45 !$omp parallel reduction (ior:i)
46 ior = 4 ! { dg-error "is not a variable" }
47 !$omp end parallel
48 end subroutine f4
49 subroutine f5
50 use mreduction3
51 integer :: i
52 i = 6
53 !$omp parallel reduction (ior:i) ! { dg-error "is not INTRINSIC procedure name" }
54 i = ior (i, 7)
55 !$omp end parallel
56 end subroutine f5
57 subroutine f6
58 use mreduction3
59 integer :: i
60 i = 6
61 !$omp parallel reduction (iand:i) ! { dg-error "is not INTRINSIC procedure name" }
62 i = iand (i, 18)
63 !$omp end parallel
64 end subroutine f6
65 ! { dg-final { cleanup-modules "mreduction3" } }