(root)/
gcc-13.2.0/
gcc/
testsuite/
gfortran.dg/
c_loc_test_19.f90
! { dg-do compile }
! { dg-options "-std=f2003" }
!
! PR fortran/50269
!
Program gf
   Use iso_c_binding
   Real( c_double ), Dimension( 1:10 ), Target :: a
   Call test( a )
Contains
   Subroutine test( aa )
     Real( c_double ), Dimension( : ), Target :: aa
     Type( c_ptr ), Pointer :: b
     b = c_loc( aa( 1 ) )  ! was rejected before.
     b = c_loc( aa ) ! { dg-error "Fortran 2008: Array of interoperable type at .1. to C_LOC which is nonallocatable and neither assumed size nor explicit size" }
   End Subroutine test
End Program gf