[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / resolve13.f90
blob1d7ec1af8f041375cf445aa7bfa5942046a75788
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 module m1
3 integer :: x
4 integer, private :: y
5 interface operator(.foo.)
6 module procedure ifoo
7 end interface
8 interface operator(-)
9 module procedure ifoo
10 end interface
11 interface operator(.priv.)
12 module procedure ifoo
13 end interface
14 interface operator(*)
15 module procedure ifoo
16 end interface
17 private :: operator(.priv.), operator(*)
18 contains
19 integer function ifoo(x, y)
20 logical, intent(in) :: x, y
21 end
22 end
24 use m1, local_x => x
25 !ERROR: 'y' is PRIVATE in 'm1'
26 use m1, local_y => y
27 !ERROR: 'z' not found in module 'm1'
28 use m1, local_z => z
29 use m1, operator(.localfoo.) => operator(.foo.)
30 !ERROR: 'OPERATOR(.bar.)' not found in module 'm1'
31 use m1, operator(.localbar.) => operator(.bar.)
33 !ERROR: 'y' is PRIVATE in 'm1'
34 use m1, only: y
35 !ERROR: 'OPERATOR(.priv.)' is PRIVATE in 'm1'
36 use m1, only: operator(.priv.)
37 !ERROR: 'OPERATOR(*)' is PRIVATE in 'm1'
38 use m1, only: operator(*)
39 !ERROR: 'z' not found in module 'm1'
40 use m1, only: z
41 !ERROR: 'z' not found in module 'm1'
42 use m1, only: my_x => z
43 use m1, only: operator(.foo.)
44 !ERROR: 'OPERATOR(.bar.)' not found in module 'm1'
45 use m1, only: operator(.bar.)
46 use m1, only: operator(-) , ifoo
47 !ERROR: 'OPERATOR(+)' not found in module 'm1'
48 use m1, only: operator(+)
50 end