OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [stfunc_4.f90] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
! Tests the fix for PR29389, in which the  statement function would not be
3
! recognised as PURE within a PURE procedure.
4
 
5
! Contributed by Francois-Xavier Coudert 
6
 
7
  INTEGER :: st1, i = 99, a(4), q = 6
8
  st1 (i) = i * i * i
9
  FORALL(i=1:4) a(i) = st1 (i)
10
  FORALL(i=1:4) a(i) = u (a(i)) - a(i)** 2
11
  if (any (a .ne. 0)) call abort ()
12
  if (i .ne. 99) call abort ()
13
contains
14
  pure integer function u (x)
15
    integer,intent(in) :: x
16
    st2 (i) = i * i
17
    u = st2(x)
18
  end function
19
end

powered by: WebSVN 2.1.0

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