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

            Bug ID: 73456
           Summary: [7 regression][concepts] ICE in
                    non_atomic_constraint_p, at cp/logic.cc:315
           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 the following program:

//----------
template<typename...> struct list {};

template<typename Seq>
concept bool Sequence = true;

template<Sequence... Seqs>
struct zip {};

template<Sequence... Seqs>
    requires requires { typename list<Seqs...>; }
// main.cpp:12:8: internal compiler error: in non_atomic_constraint_p, at
cp/logic.cc:315
struct zip<Seqs...> {};

int main()
{
    zip<list<>, list<int>> {};
}
//----------

This compiles fine with 6.1, but produces the following trace on the 7 branch
on rev. 239343:

main.cpp:12:8: internal compiler error: in non_atomic_constraint_p, at
cp/logic.cc:315
 struct zip<Seqs...> {};
        ^~~~~~~~~~~~
0x76550a non_atomic_constraint_p
        ../../gcc/gcc/cp/logic.cc:315
0x767364 any_p<std::_List_iterator<tree_node*>, bool (*)(tree_node*)>
        ../../gcc/gcc/cp/logic.cc:67
0x767364 any_non_atomic_constraints_p
        ../../gcc/gcc/cp/logic.cc:324
0x767364 analyze_atom
        ../../gcc/gcc/cp/logic.cc:356
0x767364 analyze_term
        ../../gcc/gcc/cp/logic.cc:465
0x767364 check_term
        ../../gcc/gcc/cp/logic.cc:492
0x766966 check_goal
        ../../gcc/gcc/cp/logic.cc:508
0x766966 check_proof
        ../../gcc/gcc/cp/logic.cc:534
0x766966 prove_implication
        ../../gcc/gcc/cp/logic.cc:751
0x7674a1 prove_implication
        ../../gcc/gcc/cp/logic.cc:728
0x7674a1 subsumes_constraints_nonnull
        ../../gcc/gcc/cp/logic.cc:783
0x7674a1 subsumes(tree_node*, tree_node*)
        ../../gcc/gcc/cp/logic.cc:800
0x76530f strictly_subsumes(tree_node*, tree_node*)
        ../../gcc/gcc/cp/constraint.cc:2595
0x67479d process_partial_specialization
        ../../gcc/gcc/cp/pt.c:4541
0x674ea7 push_template_decl_real(tree_node*, bool)
        ../../gcc/gcc/cp/pt.c:5262
0x675f73 push_template_decl(tree_node*)
        ../../gcc/gcc/cp/pt.c:5503
0x675f73 maybe_process_partial_specialization(tree_node*)
        ../../gcc/gcc/cp/pt.c:972
0x6b7f84 cp_parser_class_head
        ../../gcc/gcc/cp/parser.c:22075
0x6b7f84 cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:21431
0x6b7f84 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:21741

Reply via email to