URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [c_ptr_tests_12.f03] - Rev 694
Compare with Previous | Blame | View Log
! { dg-do compile }! Verify that initialization of c_ptr components works. This is based on! code from fgsl:! http://www.lrz-muenchen.de/services/software/mathematik/gsl/fortran/! and tests PR 33395.module fgsluse, intrinsic :: iso_c_bindingimplicit none!!! Kind and length parameters are default integer!integer, parameter, public :: fgsl_double = c_double!! Types : Array support!type, public :: fgsl_vectorprivatetype(c_ptr) :: gsl_vector = c_null_ptrend type fgsl_vectorcontainsfunction fgsl_vector_align(p_x, f_x)real(fgsl_double), pointer :: p_x(:)type(fgsl_vector) :: f_xinteger :: fgsl_vector_alignfgsl_vector_align = 4end function fgsl_vector_alignend module fgslmodule tmoduse fgslimplicit nonecontainssubroutine expb_df() bind(c)type(fgsl_vector) :: f_xreal(fgsl_double), pointer :: p_x(:)integer :: statusstatus = fgsl_vector_align(p_x, f_x)end subroutine expb_dfend module tmod! { dg-final { cleanup-modules "fgsl tmod" } }
