[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / resolve47.f90
blob339fc6126fccdfb359a3db231e406954ac9f5c87
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 module m1
4 !ERROR: Logical constant '.true.' may not be used as a defined operator
5 interface operator(.TRUE.)
6 end interface
7 !ERROR: Logical constant '.false.' may not be used as a defined operator
8 generic :: operator(.false.) => bar
9 end
11 module m2
12 interface operator(+)
13 module procedure foo
14 end interface
15 interface operator(.foo.)
16 module procedure foo
17 end interface
18 interface operator(.ge.)
19 module procedure bar
20 end interface
21 contains
22 integer function foo(x, y)
23 logical, intent(in) :: x, y
24 foo = 0
25 end
26 logical function bar(x, y)
27 complex, intent(in) :: x, y
28 bar = .false.
29 end
30 end
32 !ERROR: Intrinsic operator '.le.' may not be used as a defined operator
33 use m2, only: operator(.le.) => operator(.ge.)
34 !ERROR: Intrinsic operator '.not.' may not be used as a defined operator
35 use m2, only: operator(.not.) => operator(.foo.)
36 !ERROR: Logical constant '.true.' may not be used as a defined operator
37 use m2, only: operator(.true.) => operator(.foo.)
38 end