1! RUN: %S/test_modfile.sh %s %t %flang_fc1
2! REQUIRES: shell
3
4! Ensure that an interface with the same name as a derived type
5! does not cause that shadowed name to be emitted later than its
6! uses in the module file.
7
8module m
9  type :: t
10  end type
11  type :: t2
12    type(t) :: c
13  end type
14  interface t
15    module procedure f
16  end interface
17 contains
18  type(t) function f
19  end function
20end module
21
22!Expect: m.mod
23!module m
24!interface t
25!procedure::f
26!end interface
27!type::t
28!end type
29!type::t2
30!type(t)::c
31!end type
32!contains
33!function f()
34!type(t)::f
35!end
36!end
37