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/62245] gfortran miscompiles int() on mips


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 ?


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