[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / resolve05.f90
blob34c88a7b7a73dec4afcef3002c3e9b7b51baccb5
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 program p
4 integer :: p ! this is ok
5 end
6 module m
7 integer :: m ! this is ok
8 end
9 submodule(m) sm
10 integer :: sm ! this is ok
11 end
12 module m2
13 type :: t
14 end type
15 interface
16 subroutine s
17 !ERROR: Module 'm2' cannot USE itself
18 use m2, only: t
19 end subroutine
20 end interface
21 end module
22 subroutine s
23 !ERROR: 's' is already declared in this scoping unit
24 integer :: s
25 end
26 function f() result(res)
27 integer :: res
28 !ERROR: 'f' is already declared in this scoping unit
29 !ERROR: The type of 'f' has already been declared
30 real :: f
31 res = 1
32 end