Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/c_ptr_tests_13.f03 @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
! { 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