[Bug fortran/62245] gfortran miscompiles int() on mips

Joost.VandeVondele at mat dot ethz.ch gcc-bugzilla@gcc.gnu.org
Sun Aug 24 11:29:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62245

Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Joost.VandeVondele at mat dot ethz
                   |                            |.ch

--- Comment #1 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
well, the docs as well as the standard assume there that all numbers are
representable. 

Note that some compilers (ifort) won't even read -1e99 in a real, as this
exceeds the range of the real, and abort at the read statement.

The behavior on x86 is just following what the hardware does, for example
CVTTSS2SI, and will yield :

 If a converted result is larger than the maximum signed doubleword integer,
the floating-point invalid exception is raised, and if this exception is
masked, the indefinite integer value (80000000H) is returned.



More information about the Gcc-bugs mailing list