On Thu, 10 Dec 2020, Richard Sandiford wrote:
> Richard Biener writes:
> >> @@ -812,33 +997,80 @@ split_constant_offset_1 (tree type, tree op0, enum
> >> tree_code code, tree op1,
> >> }
> >> }
> >>
> >> -/* Expresses EXP as VAR + OFF, where off is a constant. The type of OFF
> >> - w
Richard Biener writes:
>> @@ -812,33 +997,80 @@ split_constant_offset_1 (tree type, tree op0, enum
>> tree_code code, tree op1,
>> }
>> }
>>
>> -/* Expresses EXP as VAR + OFF, where off is a constant. The type of OFF
>> - will be ssizetype. */
>> +/* If EXP has pointer type, try to ex
On Wed, 9 Dec 2020, Richard Sandiford wrote:
> PR98069 is about a case in which split_constant_offset miscategorises
> an expression of the form:
>
> int foo;
> …
> POINTER_PLUS_EXPR
>
> as:
>
> base: base
> offset: (sizetype) (-foo) * size
> init: INT_MIN * size
>
> “-foo” overflo
PR98069 is about a case in which split_constant_offset miscategorises
an expression of the form:
int foo;
…
POINTER_PLUS_EXPR
as:
base: base
offset: (sizetype) (-foo) * size
init: INT_MIN * size
“-foo” overflows when “foo” is INT_MIN, whereas the original expression
didn't overflow