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

            Bug ID: 124499
           Summary: ICE tree check: expected record_type or union_type or
                    qual_union_type, have template_type_parm in
                    lookup_using_decl, at cp/name-lookup.cc:6269
           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:
using decltype(auto)::a

Command:
g++ test.cpp

Output:
test.cpp:1:23: internal compiler error: tree check: expected record_type or
union_type or qual_union_type, have template_type_parm in lookup_using_decl, at
cp/name-lookup.cc:6269
    1 | using decltype(auto)::a
      |                       ^
0x2cb8d8e internal_error(char const*, ...)
        ../../gcc-trunk/gcc/diagnostic-global-context.cc:787
0xad0143 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc-trunk/gcc/tree.cc:9219
0x8bb3d1 tree_check3(tree_node*, char const*, int, char const*, tree_code,
tree_code, tree_code)
        ../../gcc-trunk/gcc/tree.h:3820
0x8bb3d1 lookup_using_decl
        ../../gcc-trunk/gcc/cp/name-lookup.cc:6269
0xdf930c finish_nonmember_using_decl(tree_node*, tree_node*)
        ../../gcc-trunk/gcc/cp/name-lookup.cc:6837
0xe04edc finish_using_decl
        ../../gcc-trunk/gcc/cp/parser.cc:24527
0xe71e0b cp_parser_using_declaration
        ../../gcc-trunk/gcc/cp/parser.cc:24691
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.cpp -dumpbase-ext .cpp -mtune=generic -march=x86-64 -o
/tmp/ccrnj176.s

This only occurs in GCC-trunk.

The test case was generated by a fuzzer.

Reply via email to