This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/21480] trivial reshape operation gives erroneous results


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]