On 8/15/13 1:35 PM, Joern Rennecke wrote:
> I see that gcc.dg/tree-ssa/ssa-pre-21.c fails for avr.
> The computation of k + 1L is done as unsigned int (16 bit),
> but later ++k is performed as unsigned long (32 bit), and thus
> array[k+1] is not re-used.
> 
> Is this to be considered a big in the optimizers for not
> optimizing this, or in the testsuite for insisting that it
> should be?

It's a but in the optimizer, the modified testcase should
optimize well on i686.  The issue is very likely that
the frontend demotes array indices to sizetype.

You may want to file a bugreport.

Richard.

> FWIW, equivalent behaviour can be seen natively on
> i686-pc-linux-gnu by replacing "long" with "long long",
> as shown in the attachment.

Reply via email to