On Thu, Mar 2, 2017 at 8:58 PM, Bernd Schmidt <bschm...@redhat.com> wrote:
> On 03/02/2017 06:50 PM, Martin Liška wrote:
>>
>> Hello.
>>
>> This is second part of fixes needed to not trigger integer overflow in
>> gcse pass.
>
>
> So, how is this intended to work? The min/max stored in the param is an int,
> and by using a HOST_WIDE_INT here, we expect that it is a larger type and
> therefore won't overflow?

HOST_WIDE_INT is equal to uint64_t (and we could mass-replace where we can
do so consistently)

Richard.

>>        {
>>         expr = flat_table[i];
>>         fprintf (file, "Index %d (hash value %d; max distance %d)\n  ",
>> -                expr->bitmap_index, hash_val[i], expr->max_distance);
>> +                expr->bitmap_index, hash_val[i],
>> (int)expr->max_distance);
>>         print_rtl (file, expr->expr);
>>         fprintf (file, "\n");
>
>
> Use HOST_WIDE_INT_PRINT_DEC maybe? Otherwise OK, I guess.
>
>
> Bernd

Reply via email to