]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR middle-end/89957 - ICE calling strnlen with an int128_t bound in a known range
authormsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Apr 2019 22:38:10 +0000 (22:38 +0000)
committermsebor <msebor@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Apr 2019 22:38:10 +0000 (22:38 +0000)
commitcdde18041971b6f391ae6ca3bd9d5293185fe3cc
treeb55605cb740d88748c0349945fe87a7b06634d12
parentffc3c769c49e4a6187adc6ddcf20581dbc36cc4c
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270154 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/builtins.c
gcc/calls.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wstringop-overflow-13.c [new file with mode: 0644]