https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122311
Bug ID: 122311
Summary: ICE with extern inline nested function defined and
used within statement expression
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
alx@devuan:~/tmp$ cat repro.c
int
main(void)
{
({
extern inline void
fn(void)
{
}
fn;
});
}
alx@devuan:~/tmp$ /opt/local/gnu/gcc/countof/bin/gcc -Wall -Wextra repro.c
-Wno-incompatible-pointer-types
repro.c: In function ‘main’:
repro.c:6:17: error: nested function ‘fn’ declared ‘extern’
6 | fn(void)
| ^~
At top level:
cc1: internal compiler error: in analyze_functions, at cgraphunit.cc:1405
0x25a585e internal_error(char const*, ...)
../../master/gcc/diagnostic-global-context.cc:518
0x9503c1 fancy_abort(char const*, int, char const*)
../../master/gcc/diagnostic.cc:1696
0x757e03 analyze_functions
../../master/gcc/cgraphunit.cc:1405
0xb5aebd symbol_table::finalize_compilation_unit()
../../master/gcc/cgraphunit.cc:2561
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.