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