aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/c_ptr_tests_13.f03
blob: 020b057fe251b6e50cba33ddb17c04fd658e1fa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do compile }
! Ensure that the user cannot call the structure constructor for one of 
! the iso_c_binding derived types.
!
! PR fortran/33760
!
program main
   use ISO_C_BINDING
   implicit none
   integer(C_INTPTR_T) p
   type(C_PTR) cptr
   p = 0
   cptr = C_PTR(p+1) ! { dg-error "is a PRIVATE component of 'c_ptr'" }
   cptr = C_PTR(1) ! { dg-error "is a PRIVATE component of 'c_ptr'" }
end program main