This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/62245] gfortran miscompiles int() on mips
- From: "Joost.VandeVondele at mat dot ethz.ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 24 Aug 2014 11:35:02 +0000
- Subject: [Bug fortran/62245] gfortran miscompiles int() on mips
- Auto-submitted: auto-generated
- References: <bug-62245-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62245
--- Comment #3 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> ---
(In reply to Julian Taylor from comment #2)
> mips is the only architecture with this behavior, all others behave as
> documented.
> Shouldn't that be reason enough to change mips?
> if not please document the exception on mips.
Not quite, for example on x86 (additionally writing a):
./a.out
1e99
is Infinity -2147483648
(note sign).
It is just undefined behavior.
I assume mips results are correct if the input real fits the range of the
integer ?