PR middle-end/77674
[official-gcc.git] / gcc / testsuite / gfortran.dg / c_loc_tests_17.f90
blob5e4eb8affabdc3f02e699a858c227a752708c69d
1 ! { dg-do compile }
3 ! PR fortran/55574
4 ! The following code used to be accepted because C_LOC pulls in C_PTR
5 ! implicitly.
7 ! Contributed by Valery Weber <valeryweber@hotmail.com>
9 program aaaa
10 use iso_c_binding, only : c_loc
11 integer, target :: i
12 type(C_PTR) :: f_ptr ! { dg-error "being used before it is defined" }
13 f_ptr=c_loc(i) ! { dg-error "Can't convert" }
14 end program aaaa