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

Subversion Repositories openrisc

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

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

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

powered by: WebSVN 2.1.0

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