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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 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.