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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [array_constructor_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
! PR 21912
3
! We didn't adapt the exit condition to negative steps in array constructors,
4
! leaving the resulting arrays uninitialized.
5
integer :: i(5), n, m, l, k
6
 
7
n = 5
8
i = (/ (m, m = n, 1, -1) /)
9
if (any (i /= (/ 5, 4, 3, 2, 1 /))) call abort
10
 
11
k = 1
12
 
13
i(5:1:-1) = (/ (m, m = n, k, -1) /)
14
if (any (i /= (/ 1, 2, 3, 4, 5 /))) call abort
15
 
16
l = -1
17
 
18
i = (/ (m, m = n, 1, l) /)
19
if (any (i /= (/ 5, 4, 3, 2, 1 /))) call abort
20
 
21
i(5:1:-1) = (/ (m, m = n, k, l) /)
22
if (any (i /= (/ 1, 2, 3, 4, 5 /))) call abort
23
end

powered by: WebSVN 2.1.0

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