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:
parent
93e544c102
commit
92c59b7466
@ -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.
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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.
|
||||
|
||||
|
9
gcc/testsuite/g++.dg/cpp0x/pr85147.C
Normal file
9
gcc/testsuite/g++.dg/cpp0x/pr85147.C
Normal 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" }
|
Loading…
Reference in New Issue
Block a user