[Bug fortran/21480] trivial reshape operation gives erroneous results
tkoenig at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Jun 8 18:59:00 GMT 2005
------- Additional Comments From tkoenig at gcc dot gnu dot org 2005-06-08 18:59 -------
Slightly reduced testcase:
$ cat 21480.f90
program reshape_bug
implicit none
complex :: a(2), b(2)
a = (/(1.0, -1.0), (2.0, -2.0)/)
write(*,*) 'from'
write(*,*) a
b=reshape(a, shape(a))
write(*,*) 'to'
write(*,*) b
end program reshape_bug
$ gfortran 21480.f90
$ ./a.out
from
( 1.000000 , -1.000000 ) ( 2.000000 , -2.000000 )
to
( 1.000000 , -1.000000 ) ( 2.8025969E-45, 2.200292 )
In other words, this has nothing to do with arrays starting
at 0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21480
More information about the Gcc-bugs
mailing list