[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / resolve10.f90
blob4f2949b808a4f90046b480f418aaf9e4dd54c646
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 module m
3 public
4 type t
5 integer, private :: i
6 end type
7 !ERROR: The default accessibility of this module has already been declared
8 private !C869
9 end
11 subroutine s1
12 !ERROR: PUBLIC statement may only appear in the specification part of a module
13 public !C869
14 end
16 subroutine s2
17 !ERROR: PRIVATE attribute may only appear in the specification part of a module
18 integer, private :: i !C817
19 end
21 subroutine s3
22 type t
23 !ERROR: PUBLIC attribute may only appear in the specification part of a module
24 integer, public :: i !C817
25 end type
26 end
28 module m4
29 interface
30 module subroutine s()
31 end subroutine
32 end interface
33 end
34 submodule(m4) sm4
35 !ERROR: PUBLIC statement may only appear in the specification part of a module
36 public !C869
37 !ERROR: PUBLIC attribute may only appear in the specification part of a module
38 real, public :: x !C817
39 type :: t
40 !ERROR: PRIVATE attribute may only appear in the specification part of a module
41 real, private :: y !C817
42 end type
43 end