[Bug tree-optimization/33498] [4.2/4.3 Regression] Optimizer (-O2) may convert a normal loop to infinite

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Sep 19 15:59:00 GMT 2007



------- Comment #2 from rguenth at gcc dot gnu dot org  2007-09-19 15:59 -------
Technically the testcase invokes undefined behavior because 'val' overflows
during loop execution.  Practically from a QOI point of view the undefinedness
should not propagate to the loop exit test (though GCCs behavior is certainly
standard conforming here).  A nice example for what undefined behavior can
cause though ;)

So, not sure if invalid or not.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33498



More information about the Gcc-bugs mailing list