]> git.ipfire.org Git - thirdparty/gcc.git/commit
c: Fix ICE for incorrect code in comptypes_verify [PR115696]
authorMartin Uecker <uecker@tugraz.at>
Sat, 29 Jun 2024 13:36:18 +0000 (15:36 +0200)
committerMartin Uecker <uecker@gcc.gnu.org>
Tue, 9 Jul 2024 19:05:26 +0000 (21:05 +0200)
commit592a746533a278a5fd3e7b5dff004e1846ef26a4
tree28dce17004e5a5f591515be582de2fc3ed52b009
parente611189899bb885a27ef8d17f77c02ada6c69069
c: Fix ICE for incorrect code in comptypes_verify [PR115696]

The new verification code produces an ICE for incorrect code.  Add the
same logic as already used in comptypes to to bail out under certain
conditions.

PR c/115696

gcc/c/
* c-typeck.cc (comptypes_verify): Bail out for
identical, empty, and erroneous input types.

gcc/testsuite/
* gcc.dg/pr115696.c: New test.
gcc/c/c-typeck.cc
gcc/testsuite/gcc.dg/pr115696.c [new file with mode: 0644]