Hi,
The following test program segfaults with ifort versions 11.1 20100414 and 10.1 20090203.
Workaround is included.
Kind regards,
Wim
!=======================
program reshape_bug implicit none integer , parameter :: dp = selected_real_kind(p=13,r=300) ! this should generate a 4-by-2 array with the elements ordered ! in the way they are shown: ! -> abscissas in the first column and ! -> weights in the second column ! this segfaults ifort version 10.1 and 11.1 real(dp) , parameter :: gl_xw002(4,2) = reshape( reshape( [ & -8.61136311594052575223e-1_dp , 3.47854845137453857373e-1_dp , & -3.39981043584856264802e-1_dp , 6.52145154862546142626e-1_dp , & 3.39981043584856264802e-1_dp , 6.52145154862546142626e-1_dp , & 8.61136311594052575223e-1_dp , 3.47854845137453857373e-1_dp & ] , shape=[2,4] , order=[1,2] ), shape=[4,2], order=[2,1] ) ! workaround: ! store the abscissas and weights in separate arrays and concatenate those real(dp) , parameter :: gl_x001(4) = [ & -8.61136311594052575223e-1_dp , & -3.39981043584856264802e-1_dp , & 3.39981043584856264802e-1_dp , & 8.61136311594052575223e-1_dp & ] real(dp) , parameter :: gl_w001(4) = [ & 3.47854845137453857373e-1_dp , & 6.52145154862546142626e-1_dp , & 6.52145154862546142626e-1_dp , & 3.47854845137453857373e-1_dp & ] real(dp) , parameter :: gl_xw003(4,2) = reshape([gl_x001,gl_w001],shape=[4,2],order=[1,2]) integer :: i do i = 1,size(gl_xw003,dim=1) print *, gl_xw003(i,:) end do end program reshape_bug!===============================



