1! { dg-do compile }
2! { dg-options "-std=f2003" }
3!
4! PR fortran/50269
5!
6Program gf
7   Use iso_c_binding
8   Real( c_double ), Dimension( 1:10 ), Target :: a
9   Call test( a )
10Contains
11   Subroutine test( aa )
12     Real( c_double ), Dimension( : ), Target :: aa
13     Type( c_ptr ), Pointer :: b
14     b = c_loc( aa( 1 ) )  ! was rejected before.
15     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" }
16   End Subroutine test
17End Program gf
18