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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

! { dg-do run }
! Test functions returning array pointers
program ret_pointer_1
  integer, pointer, dimension(:) :: a
  integer, target, dimension(2) :: b
  integer, pointer, dimension (:) :: p

  a => NULL()
  a => foo()
  p => b
  if (.not. associated (a, p)) call abort
contains
subroutine bar(p)
  integer, pointer, dimension(:) :: p
end subroutine
function foo() result(r)
  integer, pointer, dimension(:) :: r

  r => b
end function
end program

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.