[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / modfile16.f90
blob9599f19a6b7e805d2db0be31184c34743de72279
1 ! RUN: %python %S/test_modfile.py %s %flang_fc1
2 module m
3 character(2), parameter :: prefix = 'c_'
4 integer, bind(c, name='c_a') :: a
5 procedure(sub), bind(c, name=prefix//'b'), pointer :: b
6 type, bind(c) :: t
7 real :: c
8 end type
9 real :: d
10 external :: d
11 bind(c, name='dd') :: d
12 real :: e
13 bind(c, name='ee') :: e
14 external :: e
15 bind(c, name='ff') :: f
16 real :: f
17 external :: f
18 contains
19 subroutine sub() bind(c, name='sub')
20 end
21 end
23 !Expect: m.mod
24 !module m
25 ! character(2_4,1),parameter::prefix="c_"
26 ! integer(4),bind(c, name="c_a")::a
27 ! procedure(sub),bind(c, name="c_b"),pointer::b
28 ! type,bind(c)::t
29 ! real(4)::c
30 ! end type
31 ! procedure(real(4)),bind(c, name="dd")::d
32 ! procedure(real(4)),bind(c, name="ee")::e
33 ! procedure(real(4)),bind(c, name="ff")::f
34 !contains
35 ! subroutine sub() bind(c, name="sub")
36 ! end
37 !end