[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / resolve11.f90
blob33ce88342b49be599f7708d14454d663ccdc408d
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 module m
3 public i
4 integer, private :: j
5 !ERROR: The accessibility of 'i' has already been specified as PUBLIC
6 private i
7 !WARNING: The accessibility of 'j' has already been specified as PRIVATE
8 private j
9 end
11 module m2
12 interface operator(.foo.)
13 module procedure ifoo
14 end interface
15 public :: operator(.foo.)
16 !ERROR: The accessibility of 'OPERATOR(.foo.)' has already been specified as PUBLIC
17 private :: operator(.foo.)
18 interface operator(+)
19 module procedure ifoo
20 end interface
21 public :: operator(+)
22 !ERROR: The accessibility of 'OPERATOR(+)' has already been specified as PUBLIC
23 private :: operator(+) , ifoo
24 contains
25 integer function ifoo(x, y)
26 logical, intent(in) :: x, y
27 end
28 end module
30 module m3
31 type t
32 end type
33 private :: operator(.lt.)
34 interface operator(<)
35 logical function lt(x, y)
36 import t
37 type(t), intent(in) :: x, y
38 end function
39 end interface
40 !ERROR: The accessibility of 'OPERATOR(<)' has already been specified as PRIVATE
41 public :: operator(<)
42 interface operator(.gt.)
43 logical function gt(x, y)
44 import t
45 type(t), intent(in) :: x, y
46 end function
47 end interface
48 public :: operator(>)
49 !ERROR: The accessibility of 'OPERATOR(.GT.)' has already been specified as PUBLIC
50 private :: operator(.gt.)
51 end