OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [c_f_pointer_tests_4.f90] - Rev 694

Compare with Previous | Blame | View Log

! { dg-do run }
program main
   use iso_c_binding, only: c_ptr, c_loc, c_f_pointer
   implicit none
   integer, dimension(2,1,2), target :: table
   table = reshape ( (/ 1,2,-1,-2/), (/2,1,2/))
   call set_table (c_loc (table))
contains
   subroutine set_table (cptr)
     type(c_ptr), intent(in) :: cptr
     integer, dimension(:,:,:), pointer :: table_tmp
     call c_f_pointer (cptr, table_tmp, (/2,1,2/))
     if (any(table_tmp /= table)) call abort
   end subroutine set_table
end program main

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.