This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] add support for strnlen (PR 81384)
- From: Jeff Law <law at redhat dot com>
- To: Martin Sebor <msebor at gmail dot com>, David Edelsohn <dje dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 19 Jun 2018 23:24:08 -0600
- Subject: Re: [PATCH] add support for strnlen (PR 81384)
- References: <CAGWvny=NXqyu=XQehQZ_-S-Jo=DK1PTNifSnkzSht8dEDHpMkg@mail.gmail.com> <e604ef7f-a602-1c21-6ab2-8afe06779b12@gmail.com>
On 06/19/2018 02:10 PM, Martin Sebor wrote:
> 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.
Looks like a backend bug to me. Most likely there's a pattern that was
matched, but is force-splitted via "#" in its output template. If the
splitting process fails, then this is the error I'd expect to see.
>
> 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
>>
>