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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [pr15957.f90] - Blame information for rev 327

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! PR 15957
3
! we used to return the wrong shape when the order parameter was used
4
! in reshape.
5
!
6
INTEGER, parameter :: i(2,3) = reshape ((/1,2,3,4,5,6/), (/2,3/)), &
7
     j(2,4) = reshape ((/1,2,3,4,5,6/), (/2,4/), (/0,0/), (/2,1/))
8
 
9
integer :: k(2,3), m(2,4), n(2,3), o(2,4)
10
 
11
k(1,:) = (/ 1, 3, 5 /)
12
k(2,:) = (/ 2, 4, 6 /)
13
 
14
m(1,:) = (/ 1, 2, 3, 4 /)
15
m(2,:) = (/ 5, 6, 0, 0 /)
16
 
17
! check that reshape does the right thing while constant folding
18
if (any(i /= k)) call abort()
19
if (any(j /= m)) call abort()
20
 
21
! check that reshape does the right thing at runtime
22
n = reshape ((/1,2,3,4,5,6/), (/2,3/))
23
if (any(n /= k)) call abort()
24
o = reshape ((/1,2,3,4,5,6/), (/2,4/), (/0,0/), (/2,1/))
25
if (any(o /= m)) call abort()
26
end
27
 

powered by: WebSVN 2.1.0

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