re PR c++/68724 (ice in unify, at cp/pt.c:19902)

PR c++/68724
	* pt.c (unify): TRAIT_EXPR is an expr.

	PR c++/68724
	* g++.dg/cpp0x/pr68724.C: New.

From-SVN: r239177
This commit is contained in:
Nathan Sidwell 2016-08-05 19:58:36 +00:00 committed by Nathan Sidwell
parent eba2666f38
commit cace146216
4 changed files with 26 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2016-08-05 Nathan Sidwell <nathan@acm.org>
PR c++/68724
* pt.c (unify): TRAIT_EXPR is an expr.
2016-07-25 Jason Merrill <jason@redhat.com>
PR c++/71833

View File

@ -18807,7 +18807,7 @@ unify (tree tparms, tree targs, tree parm, tree arg, int strict,
/* An unresolved overload is a nondeduced context. */
if (is_overloaded_fn (parm) || type_unknown_p (parm))
return unify_success (explain_p);
gcc_assert (EXPR_P (parm));
gcc_assert (EXPR_P (parm) || TREE_CODE (parm) == TRAIT_EXPR);
/* We must be looking at an expression. This can happen with
something like:

View File

@ -1,3 +1,8 @@
2016-08-05 Nathan Sidwell <nathan@acm.org>
PR c++/68724
* g++.dg/cpp0x/pr68724.C: New.
2016-07-29 Paul Thomas <pault@gcc.gnu.org>
Backport from trunk:

View File

@ -0,0 +1,15 @@
// PR 68724 ICE in unificiation
// { dg-do compile { target c++11 } }
template <typename _Tp, _Tp>
struct integral_constant
{
};
integral_constant<bool, true> inst;
template <typename _Tp>
struct integral_constant<bool, __is_enum(_Tp)> // { dg-error "" }
{
};