1 ! { dg-do run { target c99_runtime } }
2 ! { dg-additional-sources ISO_Fortran_binding_8.c }
4 ! Test the fix for PR89842.
6 ! Contributed by Reinhold Bader <Bader@lrz.de>
9 use, intrinsic :: iso_c_binding
13 subroutine globalp(this
) bind(c
)
15 real(c_float
), allocatable
:: this(:)
16 end subroutine globalp
18 end module mod_alloc_01
24 real(c_float
), allocatable
:: myp(:)
30 ! write(*,*) 'globalp done'
31 if (.not
. allocated(myp
)) then
35 if (lbound(myp
,1) /= 3 .or
. size(myp
,1) /= 4) then
36 write(*,*) 'FAIL 2: ', lbound(myp
), size(myp
,1)
39 ! write(*,*) 'Now checking data', myp(3)
40 if (maxval(abs(myp
- [1.1, 2.3, 5.1, 4.2])) > 1.0e-6) then
41 write(*,*) 'FAIL 3: ', myp
46 if (status
.ne
. 0) then