Commit 256803d9 by Volker Reichelt Committed by Volker Reichelt

re PR c++/8785 (ICE in tsubst, at cp/pt.c:6473)

	PR c++/8785
	* g++.dg/parse/fused-params1.C: New test.

	PR c++/8857
	* g++.dg/parse/tmpl-tmpl-operator1.C: New test.

	PR c++/8921
	* g++.dg/parse/non-dependent1.C: New test.

	PR c++/8928
	* g++.dg/parse/dupl-tmpl-args1.C: New test.

	PR c++/9228
	* g++.dg/parse/undefined7.C: New test.
	* g++.dg/parse/non-templ1.C: New test.

	PR c++/9229
	* g++.dg/parse/too-many-tmpl-args1.C: New test.

From-SVN: r62499
parent 90330d31
2003-02-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/8785
* g++.dg/parse/fused-params1.C: New test.
PR c++/8857
* g++.dg/parse/tmpl-tmpl-operator1.C: New test.
PR c++/8921
* g++.dg/parse/non-dependent1.C: New test.
PR c++/8928
* g++.dg/parse/dupl-tmpl-args1.C: New test.
PR c++/9228
* g++.dg/parse/undefined7.C: New test.
* g++.dg/parse/non-templ1.C: New test.
PR c++/9229
* g++.dg/parse/too-many-tmpl-args1.C: New test.
2003-02-06 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.c-torture/compile/20030206-1.c: New test.
......
// PR c++/8928
// Origin: <sebor@roguewave.com>
// { dg-do compile }
namespace N
{
template <typename T, typename U> struct A {};
typedef A<int, int> B;
}
N::B<int, int> a; // { dg-error "" }
// PR c++/8785
// Origin: Alexander Zvyagin <Alexander.Zviagine@cern.ch>
// { dg-do compile }
template <int N,typename T> struct A
{
typedef T X;
template <int M> void foo (const A<M,X>&); // { dg-error "candidate" }
};
template <int N,int M,typename T>
void A<N,T>::foo (const A<M,X>&) {} // { dg-error "" }
// PR c++/8921
// Origin: Chin-Lung Chang <evirt@iis.sinica.edu.tw>
// { dg-do compile }
struct A
{
template <typename T> void foo();
};
template <typename T> void bar(A& a)
{
a.foo<T>();
}
void baz()
{
A a;
bar<int>(a);
}
// PR c++/9228
// Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
// { dg-do compile }
struct A
{
struct B { B(int); };
};
template <typename T> typename A<T>::B foo() { return 1; } // { dg-error "" }
// PR c++/8857
// Origin: Martin v. Loewis <loewis@informatik.hu-berlin.de>
// { dg-do compile }
template <typename T> struct A
{
template <typename U> operator U() { return sizeof(U); }
};
template <typename T> struct B
{
template <template <typename U> class X> operator X<double>() { return X<double>(); }
};
int main()
{
A<double> a;
B<long> b;
a = b;
}
// PR c++/9229
// Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
// { dg-do compile }
template <typename T> class A
{ // { dg-error "" }
struct B;
template <typename U> friend typename A<U,void>::B foo(); // { dg-error "" }
};
template class A<int>;
// PR c++/9228
// Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
// { dg-do compile }
template <typename T> typename A<T>::B foo() {} // { dg-error "" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment