This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix inline memcpy ICE (PR tree-optimization/86526)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]