ieee_9.f90: XFAIL on arm*-*-gnueabi[hf].
[official-gcc.git] / gcc / testsuite / gfortran.dg / actual_array_constructor_3.f90
blob8519d67a59774bb4986bbfb194b0073dd9c3fbe0
1 ! { dg-do run }
2 ! Tests the fix for pr28914, in which array constructors using the loop
3 ! variable within a do loop for the implied do loop of the constructor
4 ! would result in a corrupted do loop counter.
6 ! Based on the testscase by Ed Korkven <kornkven@arsc.edu>
8 program pr28914
9 implicit none
10 integer n, i
11 parameter (n = 66000) ! Problem manifests for n > 65535
12 double precision a(n), summation
14 summation = 0.0
15 do i = 1, 1
16 a = (/ (i, i = 1, n) /) ! This is legal and was broken
17 a = sqrt(a)
18 summation = SUM(a)
19 enddo
20 summation = abs(summation - 11303932.9138271_8)
22 if (summation.gt.0.00001) STOP 1
23 end program pr28914