https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128446
Bug ID: 128446
Summary: internal compiler error: in analyze_functions, at
cgraphunit.cc:1434
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, ice-on-invalid-fuzzy
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi,
$cat small.c
int f(void) {
extern inline int g(int x) {
return x + 3;
}
return g(1);
}
$gcc-trunk -c small.c
small.c: In function 'f':
small.c:2:23: error: nested function 'g' declared 'extern'
2 | extern inline int g(int x) {
| ^
At top level:
cc1: internal compiler error: in analyze_functions, at cgraphunit.cc:1432
0x5f0189d internal_error(char const*, ...)
/home/gcc/gcc/diagnostic-global-context.cc:787
0x5f1cd18 fancy_abort(char const*, int, char const*)
/home/gcc/gcc/diagnostics/context.cc:1813
0x159fe4a analyze_functions
/home/gcc/gcc/cgraphunit.cc:1432
0x15a5334 symbol_table::finalize_compilation_unit()
/home/gcc/gcc/cgraphunit.cc:2592
/home/build-gcov/install/libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1 -quiet
-imultiarch x86_64-linux-gnu small.c -quiet -dumpbase small.c -dumpbase-ext .c
-mtune=generic -march=x86-64 -o /tmp/ccqZCMv7.s
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.
The reproducer in Godbolt: https://godbolt.org/z/sns4v8TbY
Thanks.