[PATCH] add support for strnlen (PR 81384)

Martin Sebor msebor@gmail.com
Tue Jun 19 20:10:00 GMT 2018


On 06/19/2018 01:33 PM, David Edelsohn wrote:
> Martin,
>
> Does attr-nonstring-3.c assume a 64 bit environment?

I don't think so.  The error below suggests a problem during
the expansion of the strncmp built-in.  The patch didn't
change that.  I see GCC 8 ICE on the test as well so it must
be a latent bug that the test somehow manages to tickle.  Let
me try to reduce it to a small test case and open a bug.

Martin

> I'm seeing new errors on the rs6000 port
>
> FAIL: gcc.dg/attr-nonstring-3.c (internal compiler error)
> /nasfarm/edelsohn/src/src/gcc/testsuite/gcc.dg/attr-nonstring-3.c:73:1:
> error: could not split insn
> (insn 3244 3245 3246 (set (reg:SI 5 5)
>         (const_int -2147483680 [0xffffffff7fffffe0]))
> "/nasfarm/edelsohn/src/src/gcc/testsuite/gcc.dg/attr-nonstring-3.c":72
> 446 {*movsi_internal1}
>      (nil))
> during RTL pass: final
> /nasfarm/edelsohn/src/src/gcc/testsuite/gcc.dg/attr-nonstring-3.c:73:1:
> internal compiler error: in final_scan_insn_1, at final.c:3140
> ranges offset out of range
>
> Something is assuming that a 64 bit value can fit in a 32 bit register.
>
> Thanks, David
>



More information about the Gcc-patches mailing list