On 12/15/20 3:17 AM, Eric Botcazou wrote:
>> OK.
> Thanks. Unfortunately I overlooked the comment of the function:
>
> MINVAL is the lowest case value of in the case nodes,
> and RANGE is highest value minus MINVAL. MINVAL and RANGE
> are not guaranteed to be of the same type as INDEX_EXPR
> (the gimplifier doesn't change the type of case label values,
> and MINVAL and RANGE are derived from those values).
>
> so PR tree-optimization/98272 exhibits a precision mismatch now.
>
> Bootstrapped/regtested on x86-64/Linux, OK for the mainline?
>
>
> 2020-12-15 Eric Botcazou <ebotca...@adacore.com>
>
> PR tree-optimization/98272
> * tree-switch-conversion.c (bit_test_cluster::emit): When finding
> out whether the entry test can be merged in the bit test, do the
> computation using the type of the index expression.
>
>
> 2020-12-15 Eric Botcazou <ebotca...@adacore.com>
>
> * gcc.dg/pr98272.c: New test.
OK
jeff