Commit 4200a723 by Jason Merrill Committed by Jason Merrill

PR c++/73456 - ICE with constrained parameter pack.

	* logic.cc (non_atomic_constraint_p): Handle EXPR_PACK_EXPANSION.

From-SVN: r239376
parent e8283787
2016-08-11 Jason Merrill <jason@redhat.com>
PR c++/73456
* logic.cc (non_atomic_constraint_p): Handle EXPR_PACK_EXPANSION.
2016-08-10 Jason Merrill <jason@redhat.com> 2016-08-10 Jason Merrill <jason@redhat.com>
Implement C++17 constexpr if. Implement C++17 constexpr if.
......
...@@ -305,6 +305,9 @@ non_atomic_constraint_p (tree t) ...@@ -305,6 +305,9 @@ non_atomic_constraint_p (tree t)
case ICONV_CONSTR: case ICONV_CONSTR:
case DEDUCT_CONSTR: case DEDUCT_CONSTR:
case EXCEPT_CONSTR: case EXCEPT_CONSTR:
/* A pack expansion isn't atomic, but it can't decompose to prove an
atom, so it shouldn't cause analyze_atom to return undecided. */
case EXPR_PACK_EXPANSION:
return false; return false;
case CHECK_CONSTR: case CHECK_CONSTR:
case PARM_CONSTR: case PARM_CONSTR:
......
// PR c++/73456
// { dg-options "-std=c++1z -fconcepts" }
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>> {};
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment