PR tree-optimization/99489 - ICE calling strncat after strcat
authorMartin Sebor <msebor@redhat.com>
Tue, 9 Mar 2021 22:02:35 +0000 (15:02 -0700)
committerMartin Sebor <msebor@redhat.com>
Sat, 13 Mar 2021 20:45:51 +0000 (13:45 -0700)
commit77643ac4bbd0ff758edc182a12cb622b74a3c38a
tree5599d7c7c49641b4f9d14b598a1dacfdf606e8c6
parent7987beec679898cfa75839551d55ae5234a216bd
PR tree-optimization/99489 - ICE calling strncat after strcat

gcc/ChangeLog:

PR tree-optimization/99489
* builtins.c (gimple_call_alloc_size): Fail gracefully when argument
is not a call statement.

gcc/testsuite/ChangeLog:

PR tree-optimization/99489
* gcc.dg/Wstringop-truncation-9.c: New test.
gcc/builtins.c
gcc/testsuite/gcc.dg/Wstringop-truncation-9.c [new file with mode: 0644]