Commit 47790631 by Paolo Carlini Committed by Paolo Carlini

re PR c++/84330 ([concepts] ICE with broken constraint)

/cp
2018-02-15  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/84330
	* constraint.cc (tsubst_constraint_info): Handle an error_mark_node
	as first argument.

/testsuite
2018-02-15  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/84330
	* g++.dg/concepts/pr84330.C: New.

From-SVN: r257698
parent 60887f8c
2018-02-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84330
* constraint.cc (tsubst_constraint_info): Handle an error_mark_node
as first argument.
2018-02-14 Paolo Carlini <paolo.carlini@oracle.com> 2018-02-14 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84350 PR c++/84350
......
...@@ -1918,7 +1918,7 @@ tsubst_constraint_info (tree t, tree args, ...@@ -1918,7 +1918,7 @@ tsubst_constraint_info (tree t, tree args,
tree tree
tsubst_constraint (tree t, tree args, tsubst_flags_t complain, tree in_decl) tsubst_constraint (tree t, tree args, tsubst_flags_t complain, tree in_decl)
{ {
if (t == NULL_TREE) if (t == NULL_TREE || t == error_mark_node)
return t; return t;
switch (TREE_CODE (t)) switch (TREE_CODE (t))
{ {
......
2018-02-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84330
* g++.dg/concepts/pr84330.C: New.
2018-02-15 Tom de Vries <tom@codesourcery.com> 2018-02-15 Tom de Vries <tom@codesourcery.com>
* gcc.dg/Wstringop-overflow-3.c: Require effective target alloca. * gcc.dg/Wstringop-overflow-3.c: Require effective target alloca.
......
// PR c++/84330
// { dg-options "-fconcepts" }
struct A
{
template<typename T> requires sizeof(T) >> 0 void foo(T); // { dg-error "predicate constraint" }
void bar()
{
foo(0); // { dg-error "no matching" }
}
};
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