OSDN Git Service

05-04-22 Thomas Koenig <Thomas.Koenig@online.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / nested_reshape.f90
1 ! { dg-do run }
2 ! PR 20436: This used to give a runtime error.
3 program nested_reshape
4   implicit none
5   real :: k(8,2)
6   real :: o(8,2)
7
8   k = reshape((/1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0, &
9             9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0/), (/8,2/))
10
11   o = reshape(reshape(k, (/2,8/), order=(/2,1/)), (/8,2/))
12 end program