]> git.ipfire.org Git - thirdparty/gcc.git/commit
c: Add missing conditions in Walloc-size to avoid ICEs [PR112347]
authorMartin Uecker <uecker@tugraz.at>
Thu, 2 Nov 2023 12:12:15 +0000 (13:12 +0100)
committerMartin Uecker <uecker@tugraz.at>
Thu, 2 Nov 2023 13:54:53 +0000 (14:54 +0100)
commitf432a594fe6d3a0de1330ba69200d158e6248083
tree046368e1ad76258eafb93b74206e0f28ed56ac87
parent04802ed3b94bdc3083547ac08bca71764a004d01
c: Add missing conditions in Walloc-size to avoid ICEs [PR112347]

Fix ICE because of forgotten checks for pointers to void
and incomplete arrays.

Committed as obvious.

PR c/112347

gcc/c:
* c-typeck.cc (convert_for_assignment): Add missing check.

gcc/testsuite:

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