re PR c++/51398 (ICE with invalid template parameter)
/cp 2012-01-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51398 * pt.c (parameter_of_template_p): Skip error_mark_node parameters. /testsuite 2012-01-23 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51398 * g++.dg/template/crash111.C: New. From-SVN: r183445
This commit is contained in:
parent
e617b554f8
commit
1beb527252
@ -1,3 +1,8 @@
|
||||
2012-01-23 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/51398
|
||||
* pt.c (parameter_of_template_p): Skip error_mark_node parameters.
|
||||
|
||||
2012-01-23 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/51925
|
||||
|
@ -8157,6 +8157,9 @@ parameter_of_template_p (tree parm, tree templ)
|
||||
for (i = 0; i < TREE_VEC_LENGTH (parms); ++i)
|
||||
{
|
||||
tree p = TREE_VALUE (TREE_VEC_ELT (parms, i));
|
||||
if (p == error_mark_node)
|
||||
continue;
|
||||
|
||||
if (parm == p
|
||||
|| (DECL_INITIAL (parm)
|
||||
&& DECL_INITIAL (parm) == DECL_INITIAL (p)))
|
||||
|
@ -1,3 +1,8 @@
|
||||
2012-01-23 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/51398
|
||||
* g++.dg/template/crash111.C: New.
|
||||
|
||||
2012-01-23 Arnaud Charlet <charlet@adacore.com>
|
||||
|
||||
* ada/acats/tests/cxh/cxh1001.a: Removed, test not suitable on all
|
||||
|
6
gcc/testsuite/g++.dg/template/crash111.C
Normal file
6
gcc/testsuite/g++.dg/template/crash111.C
Normal file
@ -0,0 +1,6 @@
|
||||
// PR c++/51398
|
||||
|
||||
template<void, int N> struct A // { dg-error "not a valid type" }
|
||||
{
|
||||
static const int i = N;
|
||||
};
|
Loading…
Reference in New Issue
Block a user