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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [pure_byref_2.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! PR 22607: PURE return-by-reference functions
3
program main
4
  implicit none
5
  integer, dimension(2) :: b
6
  b = fun(size(b))
7
  if (b(1) /= 1 .or. b(2) /= 2) call abort()
8
contains
9
  pure function fun(n)
10
    integer, intent(in) :: n
11
    integer :: fun(n)
12
    integer :: i
13
    do i = 1, n
14
        fun(i) = i
15
    end do
16
  end function fun
17
end program main

powered by: WebSVN 2.1.0

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