[NFC][RISCV] Remove CFIIndex argument from allocateStack (#117871)
[llvm-project.git] / flang / test / Semantics / modfile44.f90
blob23d93b18a5a1f4f2e094a54e838ad57adaac6cd5
1 ! RUN: %python %S/test_modfile.py %s %flang_fc1
2 ! Ensure that m2.mod explicitly USEs a generic interface from m1
3 ! so it can utilize its shadowed derived type.
4 module m1
5 implicit none
6 type :: xyz
7 integer :: n
8 end type
9 interface xyz
10 module procedure xzy
11 end interface
12 contains
13 function xzy(j) result(res)
14 integer, intent(in) :: j
15 type(xyz) :: res
16 res%n = j
17 end function
18 end module
20 !Expect: m1.mod
21 !module m1
22 !type::xyz
23 !integer(4)::n
24 !end type
25 !interface xyz
26 !procedure::xzy
27 !end interface
28 !contains
29 !function xzy(j) result(res)
30 !integer(4),intent(in)::j
31 !type(xyz)::res
32 !end
33 !end
35 module m2
36 implicit none
37 contains
38 function foo(j) result(res)
39 use :: m1, only: xyz
40 integer, intent(in) :: j
41 type(xyz) :: res
42 res = xyz(j)
43 end function
44 end module
46 !Expect: m2.mod
47 !module m2
48 !contains
49 !function foo(j) result(res)
50 !use m1,only:xyz
51 !integer(4),intent(in)::j
52 !type(xyz)::res
53 !end
54 !end