http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56478
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dehao at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-28
08:05:03 UTC ---
loop_bound = compare_bound = 0
base = -9223372036854775808
so
HOST_WIDE_INT loop_count = (loop_bound - base) / compare_step;
first invokes undefined behavior (loop_bound - base) computation and then
-LONG_LONG_MIN / -1 SIGFPEs.
That and the following code is just full of many potential undefined behaviors.
Even the compare_count++ or loop_count++ could trigger that.