1! RUN: %S/test_errors.sh %s %t %flang_fc1
2! REQUIRES: shell
3subroutine s1
4  !OK: interface followed by type with same name
5  interface t
6  end interface
7  type t
8  end type
9  type(t) :: x
10  x = t()
11end subroutine
12
13subroutine s2
14  !OK: type followed by interface with same name
15  type t
16  end type
17  interface t
18  end interface
19  type(t) :: x
20  x = t()
21end subroutine
22
23subroutine s3
24  type t
25  end type
26  interface t
27  end interface
28  !ERROR: 't' is already declared in this scoping unit
29  type t
30  end type
31  type(t) :: x
32  x = t()
33end subroutine
34