re PR c++/36411 (ICE with invalid template template parameter)
gcc/cp 2009-02-23 H.J. Lu <hongjiu.lu@intel.com> PR c++/36411 * pt.c (coerce_template_template_parms): Return 0 if parameter is error_mark_node. gcc/testsuite/ 2009-02-23 H.J. Lu <hongjiu.lu@intel.com> PR c++/36411 * g++.dg/template/void14.C: New. From-SVN: r144396
This commit is contained in:
parent
d8028f2cc3
commit
8c8d4a46a8
|
@ -1,3 +1,9 @@
|
||||||
|
2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
PR c++/36411
|
||||||
|
* pt.c (coerce_template_template_parms): Return 0 if parameter
|
||||||
|
is error_mark_node.
|
||||||
|
|
||||||
2009-02-23 Jason Merrill <jason@redhat.com>
|
2009-02-23 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
* pt.c (unify): Call maybe_adjust_types_for_deduction when
|
* pt.c (unify): Call maybe_adjust_types_for_deduction when
|
||||||
|
|
|
@ -4756,6 +4756,9 @@ coerce_template_template_parms (tree parm_parms,
|
||||||
{
|
{
|
||||||
parm = TREE_VALUE (TREE_VEC_ELT (parm_parms, nparms - 1));
|
parm = TREE_VALUE (TREE_VEC_ELT (parm_parms, nparms - 1));
|
||||||
|
|
||||||
|
if (parm == error_mark_node)
|
||||||
|
return 0;
|
||||||
|
|
||||||
switch (TREE_CODE (parm))
|
switch (TREE_CODE (parm))
|
||||||
{
|
{
|
||||||
case TEMPLATE_DECL:
|
case TEMPLATE_DECL:
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2009-02-23 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
PR c++/36411
|
||||||
|
* g++.dg/template/void14.C: New.
|
||||||
|
|
||||||
2009-02-23 Jason Merrill <jason@redhat.com>
|
2009-02-23 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
PR c++/38880
|
PR c++/38880
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
// PR c++/36411
|
||||||
|
// { dg-do compile }
|
||||||
|
|
||||||
|
template<template<void> class> struct A // { dg-error "not a valid type" }
|
||||||
|
{
|
||||||
|
template<template<int> class T> A<T> foo(); // { dg-error "mismatch|expected|invalid" }
|
||||||
|
};
|
Loading…
Reference in New Issue