2 ! Verify that initialization of c_ptr components works.
4 use, intrinsic :: iso_c_binding
6 type, public :: fgsl_matrix
8 type(c_ptr) :: gsl_matrix = c_null_ptr
10 type, public :: fgsl_multifit_fdfsolver
12 type(c_ptr) :: gsl_multifit_fdfsolver = c_null_ptr
13 end type fgsl_multifit_fdfsolver
15 function gsl_multifit_fdfsolver_jac(s) bind(c)
17 type(c_ptr), value :: s
18 type(c_ptr) :: gsl_multifit_fdfsolver_jac
19 end function gsl_multifit_fdfsolver_jac
22 function fgsl_multifit_fdfsolver_jac(s)
23 type(fgsl_multifit_fdfsolver), intent(in) :: s
24 type(fgsl_matrix) :: fgsl_multifit_fdfsolver_jac
25 fgsl_multifit_fdfsolver_jac%gsl_matrix = &
26 gsl_multifit_fdfsolver_jac(s%gsl_multifit_fdfsolver)
27 end function fgsl_multifit_fdfsolver_jac
31 use, intrinsic :: iso_c_binding, only: c_ptr, c_null_ptr
34 type(c_ptr) :: matrix = c_null_ptr
38 type(t), intent(out) :: a
41 ! { dg-final { cleanup-modules "fgsl m" } }