xref: /llvm-project/flang/test/Semantics/modfile16.f90 (revision 3fa62efdbb6c2b639cc47823c4a5f39fc1240792)
1! RUN: %python %S/test_modfile.py %s %flang_fc1
2module m
3  character(2), parameter :: prefix = 'c_'
4  integer, bind(c, name='c_a') :: a
5  procedure(sub), bind(c, name=prefix//'b') :: b
6  type, bind(c) :: t
7    real :: c
8  end type
9contains
10  subroutine sub() bind(c, name='sub')
11  end
12end
13
14!Expect: m.mod
15!module m
16!  character(2_4,1),parameter::prefix="c_"
17!  integer(4),bind(c, name="c_a")::a
18!  procedure(sub),bind(c, name="c_b")::b
19!  type,bind(c)::t
20!    real(4)::c
21!  end type
22!contains
23!  subroutine sub() bind(c, name="sub")
24!  end
25!end
26