[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / resolve13.f90
bloba5647d0d417ab6e779305cf00de2dee986bea631
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 module m1
4 integer :: x
5 integer, private :: y
6 interface operator(.foo.)
7 module procedure ifoo
8 end interface
9 interface operator(-)
10 module procedure ifoo
11 end interface
12 interface operator(.priv.)
13 module procedure ifoo
14 end interface
15 interface operator(*)
16 module procedure ifoo
17 end interface
18 private :: operator(.priv.), operator(*)
19 contains
20 integer function ifoo(x, y)
21 logical, intent(in) :: x, y
22 end
23 end
25 use m1, local_x => x
26 !ERROR: 'y' is PRIVATE in 'm1'
27 use m1, local_y => y
28 !ERROR: 'z' not found in module 'm1'
29 use m1, local_z => z
30 use m1, operator(.localfoo.) => operator(.foo.)
31 !ERROR: 'OPERATOR(.bar.)' not found in module 'm1'
32 use m1, operator(.localbar.) => operator(.bar.)
34 !ERROR: 'y' is PRIVATE in 'm1'
35 use m1, only: y
36 !ERROR: 'OPERATOR(.priv.)' is PRIVATE in 'm1'
37 use m1, only: operator(.priv.)
38 !ERROR: 'OPERATOR(*)' is PRIVATE in 'm1'
39 use m1, only: operator(*)
40 !ERROR: 'z' not found in module 'm1'
41 use m1, only: z
42 !ERROR: 'z' not found in module 'm1'
43 use m1, only: my_x => z
44 use m1, only: operator(.foo.)
45 !ERROR: 'OPERATOR(.bar.)' not found in module 'm1'
46 use m1, only: operator(.bar.)
47 use m1, only: operator(-) , ifoo
48 !ERROR: 'OPERATOR(+)' not found in module 'm1'
49 use m1, only: operator(+)
51 end