This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/79628] New: ICE on invalid code in tsubst, at cp/pt.c:13499


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

            Bug ID: 79628
           Summary: ICE on invalid code in tsubst, at cp/pt.c:13499
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: jason at gcc dot gnu.org
  Target Milestone: ---

$ cat /tmp/ice.C
template <typename...> struct a
{
};
template <typename... b> void c (a<b, b...>...);
int d = c (a<int, double> ())

$ ./xg++ -B. /tmp/ice.C
/tmp/ice.C: In substitution of ‘template<class ... b> void c(a<b, b ...>...)
[with b = <missing>]’:
/tmp/ice.C:5:29:   required from here
/tmp/ice.C:5:29: internal compiler error: in tsubst, at cp/pt.c:13499
 int d = c (a<int, double> ())
                             ^
0x6a010d tsubst(tree_node*, tree_node*, int, tree_node*)
        ../../gcc/cp/pt.c:13499
0x6a2220 unify_pack_expansion
        ../../gcc/cp/pt.c:19959
0x6949b4 unify
        ../../gcc/cp/pt.c:20713
0x6940f7 unify
        ../../gcc/cp/pt.c:20909
0x69496a unify
        ../../gcc/cp/pt.c:20705
0x5e29e7 try_class_unification
        ../../gcc/cp/pt.c:19731
0x694af2 unify
        ../../gcc/cp/pt.c:20742
0x6a1874 unify_one_argument
        ../../gcc/cp/pt.c:18988
0x6a206b unify_pack_expansion
        ../../gcc/cp/pt.c:19969
0x6a2b8f type_unification_real
        ../../gcc/cp/pt.c:19128
0x6a931f fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool)
        ../../gcc/cp/pt.c:18493
0x65b33d add_template_candidate_real
        ../../gcc/cp/call.c:3170
0x65ba9c add_template_candidate
        ../../gcc/cp/call.c:3252
0x65ba9c add_candidates
        ../../gcc/cp/call.c:5494
0x65e4e1 perform_overload_resolution
        ../../gcc/cp/call.c:4148
0x65f95e build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, bool, int)
        ../../gcc/cp/call.c:4233
0x74034a finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ../../gcc/cp/semantics.c:2441
0x6efaaa cp_parser_postfix_expression
        ../../gcc/cp/parser.c:7017
0x6edcba cp_parser_unary_expression
        ../../gcc/cp/parser.c:8125
0x6f5f57 cp_parser_cast_expression
        ../../gcc/cp/parser.c:8802

All releases I have ICE.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]