[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / resolve10.f90
blob740195d228ddcd59a2fac42f3eba2a5db67d5ca6
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 module m
4 public
5 type t
6 integer, private :: i
7 end type
8 !ERROR: The default accessibility of this module has already been declared
9 private !C869
10 end
12 subroutine s1
13 !ERROR: PUBLIC statement may only appear in the specification part of a module
14 public !C869
15 end
17 subroutine s2
18 !ERROR: PRIVATE attribute may only appear in the specification part of a module
19 integer, private :: i !C817
20 end
22 subroutine s3
23 type t
24 !ERROR: PUBLIC attribute may only appear in the specification part of a module
25 integer, public :: i !C817
26 end type
27 end
29 module m4
30 interface
31 module subroutine s()
32 end subroutine
33 end interface
34 end
35 submodule(m4) sm4
36 !ERROR: PUBLIC statement may only appear in the specification part of a module
37 public !C869
38 !ERROR: PUBLIC attribute may only appear in the specification part of a module
39 real, public :: x !C817
40 type :: t
41 !ERROR: PRIVATE attribute may only appear in the specification part of a module
42 real, private :: y !C817
43 end type
44 end