Hi,

On Mon, 26 Oct 2020 at 13:44, Richard Sandiford via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Tamar Christina <tamar.christ...@arm.com> writes:
> > Hi Richard,
> >
> > The 10/26/2020 11:29, Richard Sandiford wrote:
> >> Tamar Christina <tamar.christ...@arm.com> writes:
> >> >    /* We can't do anything smart if the amount to copy is not constant.  
> >> > */
> >> >    if (!CONST_INT_P (operands[2]))
> >> >      return false;
> >> >
> >> > -  n = INTVAL (operands[2]);
> >> > +  /* This may get truncated but that's fine as it would be above our 
> >> > maximum
> >> > +     memset inline limit.  */
> >> > +  unsigned tmp = INTVAL (operands[2]);
> >>
> >> That's not true for (1ULL << 32) + 1 for example, since the truncated
> >> value will come under the limit.  I think we should just do:
> >>
> >>   unsigned HOST_WIDE_INT tmp = UINTVAL (operands[2]);
> >>
> >> without a comment.
> >>
> >
> > Updated patch attached.
> >
> > Ok for master and GCC 8, 9, 10?
>
> OK, thanks.
>
> Richard

The new test fails with -mabi=ilp32:
FAIL: gcc.target/aarch64/pr97535.c (test for excess errors)
Excess errors:
/gcc/testsuite/gcc.target/aarch64/pr97535.c:7:1: warning: this decimal
constant is unsigned only in ISO C90
/gcc/testsuite/gcc.target/aarch64/pr97535.c:7:13: error: size of array
'raw_buffer' is too large
/gcc/testsuite/gcc.target/aarch64/pr97535.c:11:9: warning: this
decimal constant is unsigned only in ISO C90

Do you mind fixing it?

Thanks,

Christophe

Reply via email to