OSDN Git Service

2007-02-21 Bernhard Fischer <aldot@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / gomp / reduction3.f90
1 ! { dg-do compile }
2
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   interface
37     function ior (a, b)
38       integer :: ior, a, b
39     end function
40   end interface
41   intrinsic ior
42   i = 6
43 !$omp parallel reduction (ior:i)
44   i = ior (i, 3)
45 !$omp end parallel
46 end subroutine f3
47 subroutine f4
48   integer :: i, ior
49   i = 6
50 !$omp parallel reduction (ior:i)
51   ior = 4                        ! { dg-error "Expected VARIABLE" }
52 !$omp end parallel
53 end subroutine f4
54 subroutine f5
55   use mreduction3
56   integer :: i
57   i = 6
58 !$omp parallel reduction (ior:i) ! { dg-error "is not INTRINSIC procedure name" }
59   i = ior (i, 7)
60 !$omp end parallel
61 end subroutine f5
62 subroutine f6
63   use mreduction3
64   integer :: i
65   i = 6
66 !$omp parallel reduction (iand:i) ! { dg-error "is not INTRINSIC procedure name" }
67   i = iand (i, 18)
68 !$omp end parallel
69 end subroutine f6
70 ! { dg-final { cleanup-modules "mreduction3" } }