On 05/23/2016 01:17 PM, Kyrill Tkachov wrote:
In this PR we end up hitting a signed overflow in noce_get_alt_condition
when we try to
increment or decrement a HOST_WIDE_INT that might be HOST_WIDE_INT_MAX
or HOST_WIDE_INT_MIN.
I've confirmed the overflow by adding an assert before the operation:
gcc_assert (desired_val != HOST_WIDE_INT_MAX);
Don't we have to check for overflow in whatever mode the comparison is
in, rather than using HOST_WIDE_INT?
I expect the compile test doesn't actually test anything without some
sort of sanitizer enabled for the compiler? If this results in a
miscompilation, can you construct an executable test?
Bernd