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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [pure_byref_2.f90] - Rev 193

Go to most recent revision | Compare with Previous | Blame | View Log

! { dg-do run }
! PR 22607: PURE return-by-reference functions
program main
  implicit none
  integer, dimension(2) :: b
  b = fun(size(b))
  if (b(1) /= 1 .or. b(2) /= 2) call abort()
contains
  pure function fun(n) 
    integer, intent(in) :: n
    integer :: fun(n)
    integer :: i
    do i = 1, n
        fun(i) = i
    end do
  end function fun
end program main

Go to most recent revision | 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.