[Bug fortran/44156] New: dot_product / matmul and signed zeros
tkoenig at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Sun May 16 11:36:00 GMT 2010
Strictly speaking, we should get -0.00000 in all cases.
ig25@linux-fd1f:~/Fort> cat intrinsic_signed_zero.f90
program main
implicit none
real, dimension(1) :: a, b
real, dimension(1,1) :: aa, bb
a(1) = -1.0
b(1) = 0.0
print *,a(1)*b(1)
print *,dot_product(a,b)
aa(1,1) = -1.0
bb(1,1) = 0.0
print *,matmul(aa,bb)
end program main
ig25@linux-fd1f:~/Fort> gfortran intrinsic_signed_zero.f90
ig25@linux-fd1f:~/Fort> ./a.out
-0.0000000
0.0000000
0.0000000
--
Summary: dot_product / matmul and signed zeros
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: minor
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tkoenig at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44156
More information about the Gcc-bugs
mailing list