https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124693
Bug ID: 124693
Summary: ICE: in cp_parser_abort_tentative_parse, at
cp/parser.cc:39054
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: suyuchang at whu dot edu.cn
Target Milestone: ---
This ICE only only occurs when the -fpermissive compilation option is enabled
Code:
operator volatile && alignas(union { } )(
Command:
g++ -fpermissive test.cpp
Output:
test.cpp:2:9: internal compiler error: in cp_parser_abort_tentative_parse, at
cp/parser.cc:39045
0x2cb8d8e internal_error(char const*, ...)
../../gcc-trunk/gcc/diagnostic-global-context.cc:787
0xc05055 fancy_abort(char const*, int, char const*)
../../gcc-trunk/gcc/diagnostics/context.cc:1813
0x8bf37d cp_parser_abort_tentative_parse
../../gcc-trunk/gcc/cp/parser.cc:39045
0x8bf37d cp_parser_abort_tentative_parse
../../gcc-trunk/gcc/cp/parser.cc:39043
0xe450af cp_parser_parse_and_diagnose_invalid_type_name
../../gcc-trunk/gcc/cp/parser.cc:4179
0xe70b17 cp_parser_simple_declaration
../../gcc-trunk/gcc/cp/parser.cc:17971
0xe7febb cp_parser_declaration
../../gcc-trunk/gcc/cp/parser.cc:17601
0xe83628 cp_parser_toplevel_declaration
../../gcc-trunk/gcc/cp/parser.cc:17705
0xe83628 cp_parser_translation_unit
../../gcc-trunk/gcc/cp/parser.cc:5596
0xe83628 c_parse_file()
../../gcc-trunk/gcc/cp/parser.cc:57467
0x1025990 c_common_parse_file()
../../gcc-trunk/gcc/c-family/c-opts.cc:1422
/home/syc/gcc-16.0/libexec/gcc/x86_64-pc-linux-gnu/16.0.1/cc1plus -quiet
-imultiarch x86_64-linux-gnu -D_GNU_SOURCE test.cpp -quiet -dumpdir a-
-dumpbase 2026-03-26-04-42-23-475890.cpp -dumpbase-ext .cpp -mtune=generic
-march=x86-64 -fpermissive -o /tmp/cc2rAymL.s
Regression since GCC-6.1
The test case was generated by a fuzzer.