mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-10 12:21:09 +08:00
stfunc_6.f90: Extended testcase to include more tests related to PURE and statement functions.
2008-09-07 Daniel Kraft <d@domob.eu> * gfortran.dg/stfunc_6.f90: Extended testcase to include more tests related to PURE and statement functions. From-SVN: r140084
This commit is contained in:
parent
cc54af2085
commit
fe2c39c8c2
@ -1,3 +1,8 @@
|
||||
2008-09-07 Daniel Kraft <d@domob.eu>
|
||||
|
||||
* gfortran.dg/stfunc_6.f90: Extended testcase to include more tests
|
||||
related to PURE and statement functions.
|
||||
|
||||
2008-09-07 Dorit Nuzman <dorit@il.ibm.com>
|
||||
Ira Rosen <irar@il.ibm.com>
|
||||
|
||||
|
@ -10,10 +10,13 @@
|
||||
|
||||
INTEGER :: st1, i = 99, a(4), q = 6
|
||||
st1 (i) = i * i * i
|
||||
st3 (i) = i * v(i)
|
||||
FORALL(i=1:4) a(i) = st1 (i)
|
||||
FORALL(i=1:4) a(i) = u (a(i)) - a(i)** 2
|
||||
if (any (a .ne. 0)) call abort ()
|
||||
if (i .ne. 99) call abort ()
|
||||
FORALL (i=1:4) a(i) = st3 (i) ! { dg-error "non-PURE function" "non-PURE reference in FORALL" { xfail *-*-*} }
|
||||
FORALL (i=1:4) a(i) = v(i) ! { dg-error "non-PURE function" }
|
||||
contains
|
||||
pure integer function u (x)
|
||||
integer,intent(in) :: x
|
||||
|
Loading…
x
Reference in New Issue
Block a user