1 ! { dg-do run { target c99_runtime } }
2 ! { dg-additional-sources ISO_Fortran_binding_7.c }
4 ! Test the fix for PR89841.
6 ! Contributed by Reinhold Bader <Bader@lrz.de>
8 program assumed_shape_01
9 use, intrinsic :: iso_c_binding
11 type, bind(c
) :: cstruct
16 function psub(this
, that
, case
) bind(c
, name
='Psuba') result(status
)
17 import
:: c_float
, c_int
, cstruct
18 real(c_float
) :: this(:,:)
19 type(cstruct
) :: that(:)
20 integer(c_int
), value
:: case
21 integer(c_int
) :: status
25 real(c_float
) :: t(3,7)
26 type(cstruct
), pointer :: u(:)
27 type(cstruct
), allocatable
:: v(:)
30 allocate(u(1), source
=[cstruct( 4, [1.1,2.2] ) ])
31 allocate(v(1), source
=[cstruct( 4, [1.1,2.2] ) ])
41 end program assumed_shape_01