summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/iso_c_binding_init_expr.f03
blob: 0a0099628b3e3dac3fdf7a0ba368083602fabfc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
! { dg-do compile }
! PR fortran/42354

use iso_c_binding
implicit none
integer, target :: a
type t
  type(c_ptr) :: ptr = c_loc(a)    ! { dg-error "must be an intrinsic function" }
end type t
type(c_ptr) :: ptr2 = c_loc(a)     ! { dg-error "must be an intrinsic function" }
end