1! RUN: %S/test_errors.sh %s %t %f18 -flogical-abbreviations -fxor-operator
2
3! Like m4 in resolve63 but compiled with different options.
4! Alternate operators are enabled so treat these as intrinsic.
5module m4
6contains
7  subroutine s1(x, y, z)
8    logical :: x
9    real :: y, z
10    !ERROR: Operands of .AND. must be LOGICAL; have REAL(4) and REAL(4)
11    x = y .a. z
12    !ERROR: Operands of .OR. must be LOGICAL; have REAL(4) and REAL(4)
13    x = y .o. z
14    !ERROR: Operand of .NOT. must be LOGICAL; have REAL(4)
15    x = .n. y
16    !ERROR: Operands of .NEQV. must be LOGICAL; have REAL(4) and REAL(4)
17    x = y .xor. z
18    !ERROR: Operands of .NEQV. must be LOGICAL; have REAL(4) and REAL(4)
19    x = y .x. y
20  end
21end
22
23! Like m4 in resolve63 but compiled with different options.
24! Alternate operators are enabled so treat .A. as .AND.
25module m5
26  interface operator(.A.)
27    logical function f1(x, y)
28      integer, intent(in) :: x, y
29    end
30  end interface
31  interface operator(.and.)
32    logical function f2(x, y)
33      real, intent(in) :: x, y
34    end
35  end interface
36contains
37  subroutine s1(x, y, z)
38    logical :: x
39    complex :: y, z
40    !ERROR: No intrinsic or user-defined OPERATOR(.A.) matches operand types COMPLEX(4) and COMPLEX(4)
41    x = y .and. z
42    !ERROR: No intrinsic or user-defined OPERATOR(.A.) matches operand types COMPLEX(4) and COMPLEX(4)
43    x = y .a. z
44  end
45end
46