[Bug fortran/54932] Invalid loop code generated by Fortran FE for loops with bounds in HIGH(type)
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Oct 17 09:23:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54932
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> 2012-10-17 09:22:41 UTC ---
"7.1.5.2.4 Evaluation of numeric intrinsic operations"
"The execution of any numeric operation whose result is not defined by the
arithmetic used by the processor is prohibited."
Hm, the arithmetic used by the processor specifies that HUGE(i) + 1 is -INF.
Does that mean the value after the loop should be the wrapped value?
>From the sentence above I do not read that the standard requires a
specific behavior, just that it prohibits undefined behavior. Which
means this is similar to C implementation specific behavior? Does
the standard require us to be consistent there then? Currently GCC
assumes signed overflow invokes undefined behavior.
More information about the Gcc-bugs
mailing list