------- Comment #2 from tkoenig at gcc dot gnu dot org 2007-03-18 22:46 -------
(In reply to comment #1)
> Expected result:
> 1 3 2 4
> Gfortran:
> 1 3 1 3
>
> This is correctly calculated with g95, NAG f95 and sunf95.
> gfortran compiles and gives the wrong result and ifort gives an ICE.
Interestingly enough, this works for integers.
Slightly reduced test case:
program main
implicit none
TYPE datatype
INTEGER :: I
END TYPE datatype
TYPE(datatype) :: data(2,2)
data(1,1)%i = 1
data(2,1)%i = 2
data(1,2)%i = 3
data(2,2)%i = 4
print *,data(:,:)%i
data=reshape(transpose(data),shape(data))
print *,data(:,:)
END program main
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31196