]> gcc.gnu.org Git - gcc.git/commit
c-family: Avoid ICEs on calls to internal functions [PR95963]
authorJakub Jelinek <jakub@redhat.com>
Tue, 30 Jun 2020 09:42:54 +0000 (11:42 +0200)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:15:28 +0000 (13:15 -0300)
commit269bee37b973e84f33235a5c1f95e4f4e8f75454
tree725a6fc6d3cf19d57a3f36553c3c5a87d1c81d42
parentfd84cc0d6c2fd5b80a0f484fe0255c50dea40eaa
c-family: Avoid ICEs on calls to internal functions [PR95963]

The following testcase ICEs since recent Martin's -Wnonnull changes,
we see a CALL_EXPR and ICE because CALL_EXPR_FN is NULL, which is
valid for internal function calls.  Internal function calls don't have a
function type, and will never have format_arg attribute on them nor will
serve as the i18n routines -Wformat cares about.

2020-06-30  Jakub Jelinek  <jakub@redhat.com>

PR c++/95963
* c-common.c (check_function_arguments_recurse): Don't crash on
calls to internal functions.

* g++.dg/cpp1z/launder9.C: New test.
gcc/c-family/c-common.c
gcc/testsuite/g++.dg/cpp1z/launder9.C [new file with mode: 0644]
This page took 0.086947 seconds and 6 git commands to generate.