Dear Fortran !
Here a possible bug with intel compilers (both Windows and Linux OS)
I don't see previous post for this problem but sorry in the converse case.
It involves :
1) TRANSPOSE(RESHAPE(...)) (yes, why not !)
2) Fortran 2003/2008 (re)allocatation feature
What do you think about this ?
Bernard
=================================================================
With ifort 14.0.0074.11 on windows 8 (via visual studio 2012)
V(6)=[1,2,3,4,5,6]
1 2 3 4 5 6
D = RESHAPE(V,[3,2])
1 2 3 4 5 6
E = TRANSPOSE( RESHAPE(V,[3,2]) ) in one step :
WRONG (E has not the right shape ...)
3 2 | 2 3
1 4 -858993460 2 5 -858993460
F = TRANSPOSE(D) with D = RESHAPE(V,[3,2]) in two steps : Ok
2 3
1 4 2 5 3 6
G = RESHAPE( V, Shape=[2,3] , Order=[2,1] ) in one step
with keyword order of RESHAPE : Ok
2 3
1 4 2 5 3 6
==================================================================
With ifort 14.0.0 (20130728) on Linux (ifort with -assume realloc !!)
V(6)=[1,2,3,4,5,6]
1 2 3 4 5 6
D = RESHAPE(V,[3,2])
1 2 3 4 5 6
E = TRANSPOSE( RESHAPE(V,[3,2]) ) in one step :
WRONG (E has not the right shape ...)
3 2 | 2 3
1 4 18 2 5 0
F = TRANSPOSE(D) with D = RESHAPE(V,[3,2]) in two steps : Ok
2 3
1 4 2 5 3 6
G = RESHAPE( V, Shape=[2,3] , Order=[2,1] ) in one step
with keyworf order of RESHAPE : Ok
2 3
1 4 2 5 3 6