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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { 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.
5
!
6
! Based on the testscase by Ed Korkven 
7
!
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
13
 
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)
21
 
22
  if (summation.gt.0.00001)   call abort()
23
end program pr28914
24
 
25
 

powered by: WebSVN 2.1.0

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