Fix for PR sanitize/65000 introduces an unusual gcc_assert

Richard Biener richard.guenther@gmail.com
Wed Oct 28 19:18:00 GMT 2015


On October 28, 2015 7:07:54 PM GMT+01:00, Richard Henderson <rth@redhat.com> wrote:
>On 10/28/2015 10:47 AM, Alexander Monakov wrote:
>> Hello Richard,
>>
>> Your commit to fix PR 65000 (pasted below) introduced
>>    gcc_assert (ri = (int)ri);
>>
>> I'm unclear what is meant there; if equality test was meant, that
>looks
>> suspicious to me because truncating conversion is
>implementation-defined.
>
>Of course equality was meant.  And since the argument to bitmap_set_bit
>is of 
>type int, the same truncation would happen there.  So this just
>verifies that 
>we don't lose information during the conversion.
>
>Since implementation defined doesn't mean undefined, I see no problem.

And ri == 0 cannot happen?

>
>r~




More information about the Gcc-patches mailing list