Debian Codegraph @

gcc/testsuite/gfortran.dg/c_ptr_tests_10.f03

raw
1 ! { dg-do run }
2 ! This test case exists because gfortran had an error in converting the
3 ! expressions for the derived types from iso_c_binding in some cases.
4 module c_ptr_tests_10
5 use, intrinsic :: iso_c_binding, only: c_ptr, c_null_ptr, c_intptr_t
6
7 contains
8 subroutine sub0() bind(c)
9 print *, 'c_null_ptr is: ', transfer (cptr, 0_C_INTPTR_T)
10 end subroutine sub0
11 end module c_ptr_tests_10
12
13 program main
14 use c_ptr_tests_10
15 call sub0()
16 end program main