On Tue, Nov 1, 2016 at 12:54 PM, Kyrill Tkachov
<kyrylo.tkac...@foss.arm.com> wrote:
> Hi all,
>
> Store merging ICEs on this invalid testcase because it trips up on the
> negative bitposition to store to.
> It doesn't really expect to handle negative offsets and I believe they won't
> occur very often in valid code anyway.
> Filling out structs/bitfields/class members involves positive offsets.
> I can look into removing all the assumptions about positive offsets if folks
> want me to (should involve removing
> some 'unsigned' modifiers from HOST_WIDE_INTs and double-checking some range
> checks), but for now
> this patch just fixes the ICE by rejecting negative offsets early on.
>
> Bootstrapped and tested on aarch64-none-linux-gnu and x86_64.
>
> Ok for trunk?

Ok (an improvement would be to only reject it after eventually
processing a MEM_REF base_addr).

Richard.

> Thanks,
> Kyrill
>
> 2016-11-01  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>
>
>     PR tree-optimization/78162
>     * gimple-ssa-store-merging.c (execute): Mark stores with bitpos < 0
>     as invalid.
>
> 2016-11-01  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>
>
>     PR tree-optimization/78162
>     * gcc.c-torture/compile/pr78162.c: New test.

Reply via email to