$cat nested_reshape.f90 program nested_reshape implicit none real :: k(8,2) real :: o(8,2)
k = reshape((/1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0,15.0,16.0/), (/8,2/)) o = reshape(reshape(k, (/2,8/), order=(/2,1/)), (/8,2/)) end program This program compiles fine, but gives a runtime error $gfortran nested_reshape.f90 $./a.out Fortran runtime error: shape and target do not conform the program compiles and runs fine with an intel compiler. $ifort -e95 nested_reshape.f90 $./a.out Using Debian Sid distribution. $uname -a Linux kusumanchi 2.6.9-1-686 #1 Thu Nov 25 03:48:29 EST 2004 i686 GNU/Linux $gfortran -v Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada --prefix=/usr/lib/gcc-snapshot --enable-shared --with-system-zlib --enable-nls --enable-threads=posix --without-included-gettext --disable-werror --enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-java-gc=boehm --enable-java-awt=gtk --enable-gtk-cairo --enable-checking=release i486-linux-gnu Thread model: posix gcc version 4.1.0 20050227 (experimental) $ifort -v Version 8.1 -- Summary: usring nested reshape functions gives runtime error Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kamaraju at gmail dot com CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20436