re PR c++/85147 (ICE with invalid variadic template-template parameter)

PR c++/85147
	* pt.c (fixed_parameter_pack_p_1): Punt if parm is error_mark_node.

	* g++.dg/cpp0x/pr85147.C: New test.

From-SVN: r259040
This commit is contained in:
Jakub Jelinek 2018-04-03 18:22:05 +02:00 committed by Jakub Jelinek
parent 93e544c102
commit 92c59b7466
4 changed files with 16 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2018-04-03 Jakub Jelinek <jakub@redhat.com>
PR c++/85147
* pt.c (fixed_parameter_pack_p_1): Punt if parm is error_mark_node.
PR c++/85140
* name-lookup.c (handle_namespace_attrs): Return early if attributes
is error_mark_node.

View File

@ -5101,7 +5101,7 @@ static void
fixed_parameter_pack_p_1 (tree parm, struct find_parameter_pack_data *ppd)
{
/* A type parm can't refer to another parm. */
if (TREE_CODE (parm) == TYPE_DECL)
if (TREE_CODE (parm) == TYPE_DECL || parm == error_mark_node)
return;
else if (TREE_CODE (parm) == PARM_DECL)
{

View File

@ -1,5 +1,8 @@
2018-04-03 Jakub Jelinek <jakub@redhat.com>
PR c++/85147
* g++.dg/cpp0x/pr85147.C: New test.
PR c++/85140
* g++.dg/cpp0x/gen-attrs-64.C: New test.

View File

@ -0,0 +1,9 @@
// PR c++/85147
// { dg-do compile { target c++11 } }
template<typename T> struct A
{
template<template<...T> class...> struct B {}; // { dg-error "expected|mismatch" }
};
A<int>::B<> b; // { dg-error "does not name a template type" }