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++/72415] New: [concepts] ICE in satisfy_predicate_constraint


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

            Bug ID: 72415
           Summary: [concepts] ICE in satisfy_predicate_constraint
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lucdanton at free dot fr
  Target Milestone: ---

Using rev. 238737 with the following minimal testcase:

//------------------
template<int... Indices>
struct indices {};

template<typename Dummy>
struct foo_type {
    template<int... Indices>
    static void impl(indices<Indices...>)
        requires (... && (Indices, true));

    static auto caller()
    { return impl(indices<0, 1, 2> {}); }
};

int main()
{
    // internal compiler error: in satisfy_predicate_constraint, at
cp/constraint.cc:2013
    foo_type<void>::caller();
}
//------------------

Compiling with e.g. 'g++-trunk -std=c++1z -fconcepts main.cpp' ICEs with a
trace (at the end of the report). On rev. 238124 the code behaves as expected,
i.e. compiles without linking due to the missing definition.

main.cpp: In instantiation of 'static auto foo_type<Dummy>::caller() [with
Dummy = void]':
main.cpp:17:21:   required from here
main.cpp:11:18: internal compiler error: in satisfy_predicate_constraint, at
cp/constraint.cc:2013
     { return impl(indices<0, 1, 2> {}); }
              ~~~~^~~~~~~~~~~~~~~~~~~~~
0x761a1f satisfy_predicate_constraint
        ../../gcc/gcc/cp/constraint.cc:2013
0x761a1f satisfy_constraint_1
        ../../gcc/gcc/cp/constraint.cc:2245
0x761add satisfy_constraint
        ../../gcc/gcc/cp/constraint.cc:2303
0x761b93 satisfy_associated_constraints
        ../../gcc/gcc/cp/constraint.cc:2327
0x761caf constraints_satisfied_p(tree_node*)
        ../../gcc/gcc/cp/constraint.cc:2402
0x627a96 add_function_candidate
        ../../gcc/gcc/cp/call.c:2016
0x6285ba add_template_candidate_real
        ../../gcc/gcc/cp/call.c:3149
0x628a23 add_template_candidate
        ../../gcc/gcc/cp/call.c:3191
0x628a23 add_candidates
        ../../gcc/gcc/cp/call.c:5378
0x6291f5 build_new_method_call_1
        ../../gcc/gcc/cp/call.c:8414
0x6291f5 build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc,
vl_embed>**, tree_node*, int, tree_node**, int)
        ../../gcc/gcc/cp/call.c:8613
0x708de3 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ../../gcc/gcc/cp/semantics.c:2390
0x664193 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        ../../gcc/gcc/cp/pt.c:16746
0x65d957 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:15918
0x65d87d tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:15226
0x65d845 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:15401
0x65bfb0 instantiate_decl(tree_node*, int, bool)
        ../../gcc/gcc/cp/pt.c:22148
0x697d6b maybe_instantiate_decl
        ../../gcc/gcc/cp/decl2.c:5088
0x699320 mark_used(tree_node*, int)
        ../../gcc/gcc/cp/decl2.c:5187
0x70c54b finish_qualified_id_expr(tree_node*, tree_node*, bool, bool, bool,
bool, int)
        ../../gcc/gcc/cp/semantics.c:1956

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