https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120303
Bug ID: 120303
Summary: ICE Segmentation fault, in groktypename at
gcc/c/c-decl.cc:5442
Product: gcc
Version: 15.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: rundongyang22 at m dot fudan.edu.cn
Target Milestone: ---
Created attachment 61438
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61438&action=edit
The preprocessed C source file that triggers the bug
----------
GCC Version & System Type & Configure Options
$ $CC -v
Using built-in specs.
COLLECT_GCC=/home/liuyu/Desktop/gcc-15/bin/gcc
COLLECT_LTO_WRAPPER=/home/liuyu/Desktop/gcc-15/libexec/gcc/x86_64-pc-linux-gnu/15.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/home/liuyu/Desktop/gcc-15
--enable-languages=c,c++ --disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.1.0 (GCC)
----------
Compiler Output
$ $CC ./4206.i
./4206.c: In function ‘main’:
./4206.c:7:20: error: expected ‘)’ before 'a'
./4206.c:7:5: internal compiler error: Segmentation fault
0x3823b9b internal_error(char const*, ...)
../../gcc/diagnostic-global-context.cc:517
0x1907b03 crash_signal
../../gcc/toplev.cc:322
0x7f92baf4108f ???
/build/glibc-FcRMwW/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0xe777b7 groktypename(c_type_name*, tree_node**, bool*)
../../gcc/c/c-decl.cc:5442
0xf29c2a c_parser_generic_selection
../../gcc/c/c-parser.cc:11055
0xf320f9 c_parser_postfix_expression
../../gcc/c/c-parser.cc:13228
0xf283d8 c_parser_unary_expression
../../gcc/c/c-parser.cc:10602
0xf27403 c_parser_cast_expression
../../gcc/c/c-parser.cc:10443
0xf24db9 c_parser_binary_expression
../../gcc/c/c-parser.cc:10211
0xf24236 c_parser_conditional_expression
../../gcc/c/c-parser.cc:9906
0xf23dec c_parser_expr_no_commas
../../gcc/c/c-parser.cc:9819
0xf34ac7 c_parser_expression
../../gcc/c/c-parser.cc:13873
0xf34f72 c_parser_expression_conv
../../gcc/c/c-parser.cc:13932
0xf1f3b4 c_parser_statement_after_labels
../../gcc/c/c-parser.cc:8354
0xf1dbc5 c_parser_compound_statement_nostart
../../gcc/c/c-parser.cc:7755
0xf1b3c8 c_parser_compound_statement
../../gcc/c/c-parser.cc:6973
0xf10b46 c_parser_declaration_or_fndef
../../gcc/c/c-parser.cc:3173
0xf0dc25 c_parser_external_declaration
../../gcc/c/c-parser.cc:2105
0xf0d66a c_parser_translation_unit
../../gcc/c/c-parser.cc:1959
0xf72fdf c_parse_file()
../../gcc/c/c-parser.cc:29790
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.