[Bug fortran/40675] sign intrinsic fails for value of 0.0
kargl at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Jul 7 20:10:00 GMT 2009
------- Comment #7 from kargl at gcc dot gnu dot org 2009-07-07 20:09 -------
(In reply to comment #5)
> > OK, so I should instead be submitting a bug report for intel and g77 and
> > pgi. gfortran is the only correct implementation?
>
> The key point is: "If the processor cannot distinguish between positive and
> negative real zero".
> gfortran can do the distinction, but I would be very surprised that g77 can do
> the distinction, so its behavior seems standard conforming.
>
For the Fortran 77 standard:
4.1.3 Data Type Properties
The mathematical and representation properties for each of the data
types are specified in the following sections. For real, double
precision, and integer data, the value zero is considered neither
positive nor negative. The value of a signed zero is the same as
the value of an unsigned zero.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40675
More information about the Gcc-bugs
mailing list