2 ! Tests the fix for PR29389, in which the statement function would not be
3 ! recognised as PURE within a PURE procedure.
5 ! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7 INTEGER :: st1, i = 99, a(4), q = 6
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 ()
14 pure integer function u (x)
15 integer,intent(in) :: x