https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124612

            Bug ID: 124612
           Summary: ICE: in poplevel_class, at cp/name-lookup.cc:5823
           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: ---

Code:
class a { template <enum alignas(a a ::a

Command:
g++ test.cpp

Output:
test.cpp:2:33: internal compiler error: in poplevel_class, at
cp/name-lookup.cc:5823
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
0x8b75c0 poplevel_class()
        ../../gcc-trunk/gcc/cp/name-lookup.cc:5823
0xc55658 popclass()
        ../../gcc-trunk/gcc/cp/class.cc:8691
0xc55c99 pop_nested_class()
        ../../gcc-trunk/gcc/cp/class.cc:8845
0xe4a4b8 cp_parser_enum_specifier
        ../../gcc-trunk/gcc/cp/parser.cc:24105
0xe3a423 cp_parser_type_specifier
        ../../gcc-trunk/gcc/cp/parser.cc:22307
0xe5b700 cp_parser_decl_specifier_seq
        ../../gcc-trunk/gcc/cp/parser.cc:18843
0xe4f2c6 cp_parser_parameter_declaration
        ../../gcc-trunk/gcc/cp/parser.cc:28451
0xe5125b cp_parser_template_parameter
        ../../gcc-trunk/gcc/cp/parser.cc:20827
0xe5125b cp_parser_template_parameter_list
        ../../gcc-trunk/gcc/cp/parser.cc:20511
0xe6f975 cp_parser_explicit_template_declaration
        ../../gcc-trunk/gcc/cp/parser.cc:36316
0xe38c95 cp_parser_member_specification_opt
        ../../gcc-trunk/gcc/cp/parser.cc:30794
0xe38c95 cp_parser_class_specifier
        ../../gcc-trunk/gcc/cp/parser.cc:29711
0xe3a38f cp_parser_type_specifier
        ../../gcc-trunk/gcc/cp/parser.cc:22337
0xe5b700 cp_parser_decl_specifier_seq
        ../../gcc-trunk/gcc/cp/parser.cc:18843
0xe70847 cp_parser_simple_declaration
        ../../gcc-trunk/gcc/cp/parser.cc:17943
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
/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 test_2559410pop.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64
-o /tmp/cc6FLP8Z.s

Goes back to a while: https://godbolt.org/z/149cT67sW

The test case was generated by a fuzzer.

Reply via email to