Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / resolve22.f90
blob8009a32a0f0d516af3add39ea848fb2dce45ef0e
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 subroutine s1
3 !OK: interface followed by type with same name
4 interface t
5 end interface
6 type t
7 end type
8 type(t) :: x
9 x = t()
10 end subroutine
12 subroutine s2
13 !OK: type followed by interface with same name
14 type t
15 end type
16 interface t
17 end interface
18 type(t) :: x
19 x = t()
20 end subroutine
22 subroutine s3
23 type t
24 end type
25 interface t
26 end interface
27 !ERROR: 't' is already declared in this scoping unit
28 type t
29 end type
30 type(t) :: x
31 x = t()
32 end subroutine
34 module m4
35 type t1
36 class(t2), pointer :: p => null()
37 end type
38 type t2
39 end type
40 interface t2
41 procedure ctor
42 end interface
43 contains
44 function ctor()
45 type(t2) ctor
46 end function
47 end module