Merge -r 127928:132243 from trunk
[official-gcc.git] / gcc / testsuite / gfortran.dg / c_ptr_tests_13.f03
blobc7a603bcce6c6424210a0e0afc0bf2ee354009b5
1 ! { dg-do compile }
2 ! Ensure that the user cannot call the structure constructor for one of 
3 ! the iso_c_binding derived types.
5 ! PR fortran/33760
7 program main
8    use ISO_C_BINDING
9    implicit none
10    integer(C_INTPTR_T) p
11    type(C_PTR) cptr
12    p = 0
13    cptr = C_PTR(p+1) ! { dg-error "Components of structure constructor" }
14    cptr = C_PTR(1) ! { dg-error "Components of structure constructor" } 
15 end program main