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] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Test functions returning array pointers
3
program ret_pointer_1
4
  integer, pointer, dimension(:) :: a
5
  integer, target, dimension(2) :: b
6
  integer, pointer, dimension (:) :: p
7
 
8
  a => NULL()
9
  a => foo()
10
  p => b
11
  if (.not. associated (a, p)) call abort
12
contains
13
subroutine bar(p)
14
  integer, pointer, dimension(:) :: p
15
end subroutine
16
function foo() result(r)
17
  integer, pointer, dimension(:) :: r
18
 
19
  r => b
20
end function
21
end program
22
 

powered by: WebSVN 2.1.0

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