3 ! Contributed by Reinhold Bader
5 program assumed_shape_01
6 use, intrinsic :: iso_c_binding
8 type, bind(c
) :: cstruct
13 subroutine psub(this
, that
) bind(c
, name
='Psub')
14 import
:: c_float
, cstruct
15 real(c_float
) :: this(:,:)
16 type(cstruct
) :: that(:)
20 real(c_float
) :: t(3,7)
21 type(cstruct
), pointer :: u(:)
23 ! The following is VALID Fortran 2008 but NOT YET supported
24 allocate(u
, source
=[cstruct( 4, [1.1,2.2] ) ])
28 end program assumed_shape_01