2 ! { dg-additional-sources ISO_Fortran_binding_5.c }
6 ! Contributed by Reinhold Bader <Bader@lrz.de>
9 use, intrinsic :: iso_c_binding
11 type, bind(c
) :: cstruct
16 subroutine psub(this
, that
, ierr
) bind(c
, name
='Psub')
17 import
:: c_float
, cstruct
, c_int
18 real(c_float
), allocatable
:: this(:,:)
19 type(cstruct
), allocatable
:: that(:)
20 integer(c_int
), intent(inout
) :: ierr
24 real(c_float
), allocatable
:: t(:,:)
25 type(cstruct
), allocatable
:: u(:)
26 integer(c_int
) :: ierr
31 allocate(u(1), source
=[ cstruct( 4, [1.1,2.2] ) ] )
35 if (ierr
.ne
. 0) stop ierr
36 end program allocatable_01