blob: d2646b6ca6154b0232933a6578d97f8d054ef168 [file] [log] [blame]
Ivan Zhechevdc453dcf2021-09-06 13:57:14 +00001! RUN: %python %S/test_modfile.py %s %flang_fc1
peter klausler4864d9f2021-01-13 14:12:23 -08002
3! Ensure that an interface with the same name as a derived type
4! does not cause that shadowed name to be emitted later than its
5! uses in the module file.
6
7module m
8 type :: t
9 end type
10 type :: t2
11 type(t) :: c
12 end type
13 interface t
14 module procedure f
15 end interface
16 contains
17 type(t) function f
18 end function
19end module
20
21!Expect: m.mod
22!module m
23!interface t
24!procedure::f
25!end interface
26!type::t
27!end type
28!type::t2
29!type(t)::c
30!end type
31!contains
32!function f()
33!type(t)::f
34!end
35!end