OSDN Git Service

2010-04-27 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / c_ptr_tests_13.f03
1 ! { dg-do compile }
2 ! Ensure that the user cannot call the structure constructor for one of 
3 ! the iso_c_binding derived types.
4 !
5 ! PR fortran/33760
6 !
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