[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / resolve05.f90
blob5c045aa99a5913e937eba6f537e017a10d946111
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 program p
3 integer :: p ! this is ok
4 end
5 module m
6 integer :: m ! this is ok
7 end
8 submodule(m) sm
9 integer :: sm ! this is ok
10 end
11 module m2
12 type :: t
13 end type
14 interface
15 subroutine s
16 !ERROR: Module 'm2' cannot USE itself
17 use m2, only: t
18 end subroutine
19 end interface
20 end module
21 subroutine s
22 !ERROR: 's' is already declared in this scoping unit
23 integer :: s
24 end
25 function f() result(res)
26 integer :: res
27 !ERROR: 'f' is already declared in this scoping unit
28 !ERROR: The type of 'f' has already been declared
29 real :: f
30 res = 1
31 end