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

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:

$ cat unified.ii
template <bool> struct A;
class Vector {
  template <typename> struct TypeIsGCThing {
    template <typename T, typename A<T ::value>::Type> using Vector = Vector;
    struct B;
    template <typename> class ContainerIter {
      using Action = B;
      using ActionVector = Vector<Action, 0>;
      ContainerIter<ActionVector> a;
    };
  };
};

$ g++ unified.ii -c
unified.ii:9:33: internal compiler error: in strip_typedefs, at cp/tree.c:1682
    9 |       ContainerIter<ActionVector> a;
      |                                 ^
0x5c5ba0 strip_typedefs(tree_node*, bool*, unsigned int)
        ../../gcc/cp/tree.c:1682
0x5c5ba0 strip_typedefs(tree_node*, bool*, unsigned int)
        ../../gcc/cp/tree.c:1462
0x6f4311 canonicalize_type_argument
        ../../gcc/cp/pt.c:7928
0x6f4311 canonicalize_type_argument
        ../../gcc/cp/pt.c:7923
0x70734d coerce_template_parms
        ../../gcc/cp/pt.c:8771
0x7080df coerce_innermost_template_parms
        ../../gcc/cp/pt.c:8903
0x71842a lookup_template_class_1
        ../../gcc/cp/pt.c:9608
0x71842a lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ../../gcc/cp/pt.c:9978
0x730e0d finish_template_type(tree_node*, tree_node*, int)
        ../../gcc/cp/semantics.c:3396
0x6e28fd cp_parser_template_id
        ../../gcc/cp/parser.c:16545
0x6e2af7 cp_parser_class_name
        ../../gcc/cp/parser.c:23416
0x6df890 cp_parser_qualifying_entity
        ../../gcc/cp/parser.c:6724
0x6df890 cp_parser_nested_name_specifier_opt
        ../../gcc/cp/parser.c:6408
0x6dfe92 cp_parser_nested_name_specifier
        ../../gcc/cp/parser.c:6650
0x6e489a cp_parser_using_declaration
        ../../gcc/cp/parser.c:19603
0x6ef7bc cp_parser_member_declaration
        ../../gcc/cp/parser.c:24632
0x6cc220 cp_parser_member_specification_opt
        ../../gcc/cp/parser.c:24492
0x6cc220 cp_parser_class_specifier_1
        ../../gcc/cp/parser.c:23592
0x6cdc00 cp_parser_class_specifier
        ../../gcc/cp/parser.c:23899
0x6cdc00 cp_parser_type_specifier
        ../../gcc/cp/parser.c:17507

Reply via email to