This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/21480] trivial reshape operation gives erroneous results
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jun 2005 18:59:11 -0000
- Subject: [Bug fortran/21480] trivial reshape operation gives erroneous results
- References: <20050509230404.21480.kamaraju@gmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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