re PR c++/13810 (ICE on invalid default templates)

PR c++/13810
	* g++.dg/template/ttp7.C: New test.

From-SVN: r76594
This commit is contained in:
Giovanni Bajo 2004-01-25 22:46:48 +00:00
parent a3a503a572
commit bbcd2439ba
2 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2004-01-25 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/13810
* g++.dg/template/ttp7.C: New test.
2004-01-25 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/13797

View File

@ -0,0 +1,16 @@
// { dg-do compile }
// Contributed by Andrew Pinski <pinskia at gcc dot gnu dot org>
// PR c++/13810: ICE while parsing invalid default argument for a
// template template parameter.
struct X;
template<int> struct A {};
template<template<int> class = X > struct B1 {}; // { dg-error "as a default value" }
template<template<int> class = A<0> > struct B2 {}; // { dg-error "as a default value" }
template <typename T>
struct S {
template <template <typename> class = S> struct I1 {}; // { dg-error "as a default value" }
template <template <typename> class = ::S> struct I2 {};
};