URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [reshape.f90] - Rev 816
Compare with Previous | Blame | View Log
! { dg-do run }! This tests a few reshape PRs.program reshimplicit nonereal, dimension (2,3) :: a,creal, dimension (12) :: btype fooreal :: rend type footype(foo), dimension (2,3) :: artype(foo), dimension (12) :: brcharacter (len=80) line1, line2, line3integer :: i! PR 21108: This used to give undefined results.b = (/(i,i=1,12)/)a = reshape(b(1:12:2),shape(a),order=(/2,1/))c = reshape(b(1:12:2),shape(a),order=(/2,1/))if (any (a /= c)) call abort! Test generic reshapebr%r = bar = reshape(br(1:12:2),shape(a),order=(/2,1/))if (any (ar%r /= a)) call abort! Test callee-allocated memory with a write statementwrite (line1,'(6F8.3)') reshape(b(1:12:2),shape(a),order=(/2,1/))write (line2,'(6F8.3)') aif (line1 /= line2 ) call abortwrite (line3,'(6F8.3)') reshape(br(1:12:2),shape(ar),order=(/2,1/))if (line1 /= line3 ) call abortend
