]> git.ipfire.org Git - thirdparty/gcc.git/commit
c: Fix ICE for invalid code with variadic and old-school prototypes [PR121507]
authorMartin Uecker <uecker@tugraz.at>
Sun, 21 Dec 2025 18:10:56 +0000 (19:10 +0100)
committerMartin Uecker <uecker@gcc.gnu.org>
Sat, 3 Jan 2026 10:36:38 +0000 (11:36 +0100)
commitb46e4afaff5b2cfd23b6d4d364d12f3f7ec07f78
treede8ba075208c92e5369d9e987a992f5ff5134965
parent41177976c5e4448365f1966f6594458232db05fc
c: Fix ICE for invalid code with variadic and old-school prototypes [PR121507]

When mixing old-school definition without prototype and new C23
variadic functions without named argument, there can be an ICE
when trying to form the composite type.  Avoid this by letting it
fail later due to incompatible types.

PR c/121507

gcc/c/ChangeLog:
* c-decl.cc (start_function): Adapt condition.

gcc/testsuite/ChangeLog:
* gcc.dg/pr121507.c: New test.
gcc/c/c-decl.cc
gcc/testsuite/gcc.dg/pr121507.c [new file with mode: 0644]