This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix inline memcpy ICE (PR tree-optimization/86526)
- From: Jeff Law <law at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, Richard Biener <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 16 Jul 2018 15:17:54 -0600
- Subject: Re: [PATCH] Fix inline memcpy ICE (PR tree-optimization/86526)
- References: <20180716204110.GH7166@tucnak>
On 07/16/2018 02:41 PM, Jakub Jelinek wrote:
> Hi!
>
> builtin_memcpy_read_str is a function meant to be called just as a callback
> and verifies that we don't cross a '\0' boundary in the string. For
> inline_string_cmp, we've checked that the length returned from c_getstr
> is fine, so we can cross as many embedded NULs as there are within the
> TREE_STRING_LENGTH.
>
> The rest of the patch is just a temporary to avoid using as_a twice in
> each loop iteration, and lots of formatting fixes, mostly to avoid trailing
> whitespace.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
>
> 2018-07-16 Jakub Jelinek <jakub@redhat.com>
>
> PR tree-optimization/86526
> * builtins.c (expand_builtin_memcmp): Formatting fixes.
> (inline_expand_builtin_string_cmp): Likewise.
> (inline_string_cmp): Likewise. Use c_readstr instead of
> builtin_memcpy_read_str. Add unit_mode temporary.
>
> * gcc.c-torture/compile/pr86526.c: New test.
OK.
This looks like it'll fix the m68k linux kernel build failure I saw over
the weekend as well.
jeff