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

            Bug ID: 124611
           Summary: ICE: in make_typename_type, at cp/decl.cc:5070
           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:
template <typename a, alignas(enum: enum {} {} struct a ::template a<b
a>::a<>::

Command:
g++ test.cpp

Output:
test.cpp:2:72: internal compiler error: in make_typename_type, at
cp/decl.cc:5070
    2 |                               : enum {} {} struct a ::template a<b
a>::a<>::
      |                                                                       
^~~
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
0x874dcf make_typename_type(tree_node*, tree_node*, tag_types, int)
        ../../gcc-trunk/gcc/cp/decl.cc:5070
0x874dcf make_typename_type(tree_node*, tree_node*, tag_types, int)
        ../../gcc-trunk/gcc/cp/decl.cc:5016
0xe5b3af cp_parser_class_name
        ../../gcc-trunk/gcc/cp/parser.cc:29540
0xe42626 cp_parser_qualifying_entity
        ../../gcc-trunk/gcc/cp/parser.cc:8324
0xe42626 cp_parser_nested_name_specifier_opt
        ../../gcc-trunk/gcc/cp/parser.cc:7992
0xe4328c cp_parser_nested_name_specifier
        ../../gcc-trunk/gcc/cp/parser.cc:8233
0xe4328c cp_parser_ptr_operator
        ../../gcc-trunk/gcc/cp/parser.cc:27289
0xe47fa5 cp_parser_declarator
        ../../gcc-trunk/gcc/cp/parser.cc:26475
0xe6dea0 cp_parser_init_declarator
        ../../gcc-trunk/gcc/cp/parser.cc:25888
0xe70958 cp_parser_simple_declaration
        ../../gcc-trunk/gcc/cp/parser.cc:18064
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 test_2452231make.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64
-o /tmp/cc1PQYEc.s


The test case was generated by a fuzzer.

Reply via email to