[Bug middle-end/89957] ICE calling strnlen with an int128_t bound in a known range
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Apr 4 22:38:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89957
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Author: msebor
Date: Thu Apr 4 22:38:10 2019
New Revision: 270154
URL: https://gcc.gnu.org/viewcvs?rev=270154&root=gcc&view=rev
Log:
PR middle-end/89957 - ICE calling strnlen with an int128_t bound in a known
range
PR middle-end/89911 - [9 Regression] ICE in get_attr_nonstring_decl
gcc/ChangeLog:
PR middle-end/89957
PR middle-end/89911
* builtins.c (expand_builtin_strnlen): Make sure wi::ltu_p operands
have the same precision since the function crashes otherwise.
* calls.c (maybe_warn_nonstring_arg): Avoid assuming strnlen() call
has non-zero arguments.
gcc/testsuite/ChangeLog:
PR middle-end/89957
PR middle-end/89911
* gcc.dg/Wstringop-overflow-13.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/Wstringop-overflow-13.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/builtins.c
trunk/gcc/calls.c
trunk/gcc/testsuite/ChangeLog
More information about the Gcc-bugs
mailing list