URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [pr32627.f03] - Rev 302
Compare with Previous | Blame | View Log
! { dg-do run }! { dg-additional-sources pr32627_driver.c }! Verify that c_f_pointer exists for string arguments.program mainuse iso_c_bindingimplicit noneinterfacefunction get_c_string() bind(c)use, intrinsic :: iso_c_binding, only: c_ptrtype(c_ptr) :: get_c_stringend function get_c_stringend interfacetype, bind( c ) :: Ainteger( c_int ) :: xc, yctype( c_ptr ) :: strend typetype( c_ptr ) :: xtype( A ), pointer :: fptrtype( A ), target :: my_a_typecharacter( len=9 ), pointer :: strptrfptr => my_a_typefptr%str = get_c_string()call c_f_pointer( fptr%str, strptr )print *, 'strptr is: ', strptrend program main
