1! { dg-do compile }
2
3module mreduction3
4  interface
5    function ior (a, b)
6      integer :: ior, a, b
7    end function
8  end interface
9contains
10  function iand (a, b)
11    integer :: iand, a, b
12    iand = a + b
13  end function
14end module mreduction3
15subroutine f1
16  integer :: i, ior
17  ior = 6
18  i = 6
19!$omp parallel reduction (ior:i) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found" }
20!$omp end parallel
21end subroutine f1
22subroutine 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 "OMP DECLARE REDUCTION\[^\n\r\]*not found" }
31  i = ior (i, 3)
32!$omp end parallel
33end subroutine f2
34subroutine 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
41end subroutine f3
42subroutine 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
48end subroutine f4
49subroutine f5
50  use mreduction3
51  integer :: i
52  i = 6
53!$omp parallel reduction (ior:i) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found" }
54  i = ior (i, 7)
55!$omp end parallel
56end subroutine f5
57subroutine f6
58  use mreduction3
59  integer :: i
60  i = 6
61!$omp parallel reduction (iand:i) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found" }
62  i = iand (i, 18)
63!$omp end parallel
64end subroutine f6
65