+1999-08-25 Paul Burchard <burchard@pobox.com>
+
+ * g++.old-deja/g++.pt/lss-001.C, lss-002.C, lss-003.C, lss-004.C,
+ lss-005.C, lss-006.C, lss-007.C, lss-008.C, lss-009.C, lss-010.C,
+ lss-011.C: New tests.
+
1999-08-25 Nathan Sidwell <nathan@acm.org>
* g++.old-deja/g++.other/decl5.C: New test.
--- /dev/null
+// Build don't link:
+// crash test -
+
+// by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc.
+// Copyright (C) 1999 Free Software Foundation
+
+template<class T>
+class X {
+ class Y : public T {}; // ERROR - invalid base type
+ Y y;
+};
+int main() {
+ X<int> x; // ERROR - (instantiated from here)
+}
+
--- /dev/null
+// Build don't link:
+
+// by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc.
+// Copyright (C) 1999 Free Software Foundation
+
+template<class X>
+class A {
+};
+template<class Y>
+class B {
+};
+
+template<template<class XX> class AA> // gets bogus error - `template <class XX> template <class X> class A<X>' previously declared here
+class C {
+ class D {
+ };
+ D d;
+ class E : public B<D> {
+ };
+ E e;
+};
+
+int main() {
+ C<A> c; // gets bogus error - redefinition of `template <class XX> template <class X> class A<X>'
+}
+
--- /dev/null
+// Build don't link:
+// crash test -
+
+// by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc.
+// Copyright (C) 1999 Free Software Foundation
+
+typedef std::vector<int>::iterator iter; // ERROR - syntax error before `::'
+
--- /dev/null
+// Build don't link:
+// crash test - XFAIL *-*-*
+
+// by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc.
+// Copyright (C) 1999 Free Software Foundation
+
+class Q {
+ template<class>
+ class X {
+ };
+};
+template<template<class> class>
+class Y {
+};
+Y<Q::X> y1;
+
--- /dev/null
+// Build don't link:
+// crash test - XFAIL *-*-*
+
+// by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc.
+// Copyright (C) 1999 Free Software Foundation
+
+class Q {
+ template<class>
+ class X {
+ };
+};
+template<template<class> class>
+class Y {
+};
+Y<typename Q::X> y; // ERROR - typename out of template context
+
--- /dev/null
+// Build don't link:
+// crash test - XFAIL *-*-*
+
+// by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc.
+// Copyright (C) 1999 Free Software Foundation
+
+class Q {
+ template<class>
+ class X {
+ };
+};
+template<template<class> class>
+class Y {
+};
+Q::template X<int> x; // ERROR - template syntax
+
--- /dev/null
+// Build don't link:
+// crash test - XFAIL *-*-*
+// regression test -
+
+// by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc.
+// Copyright (C) 1999 Free Software Foundation
+
+template<class A>
+struct X {
+ X(A) {
+ }
+};
+template<class A>
+struct Y {
+ static X<A> x(A(1)); // ERROR - ANSI C++ forbids in-class initialization of non-const static member `x'
+};
+Y<int> y;
+
--- /dev/null
+// Build don't link:
+// crash test - XFAIL *-*-*
+
+// by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc.
+// Copyright (C) 1999 Free Software Foundation
+
+struct Q {
+ template<class>
+ class X {
+ };
+ template<template<class> class XX = X> // gets bogus error - (original definition appeared here)
+ class Y {
+ }; // gets bogus error - redefinition of default argument for `template <class> XX'
+ Y<> y;
+};
+
--- /dev/null
+// Build don't link:
+// crash test - XFAIL *-*-*
+
+// by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc.
+// Copyright (C) 1999 Free Software Foundation
+
+class Q {
+ template<class T>
+ class X {
+ };
+};
+template<template<class> class XX>
+class Y {
+ XX<int> x_;
+};
+Y<Q::X> y;
+
--- /dev/null
+// Build don't link:
+// regression test -
+
+// by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc.
+// Copyright (C) 1999 Free Software Foundation
+// related to bug report by Leon Bottou <leonb@research.att.com>
+
+struct A {
+ template<class T>
+ struct B {
+ };
+ template<class T>
+ struct C {
+ B<T> b; // gets bogus error - B is not a template
+ // but removing wrapper A gets rid of complaint
+ // also, replacing B<T> with A::B<T> also gets rid of complaint
+ };
+};
+
--- /dev/null
+// Build don't link:
+// crash test - XFAIL *-*-*
+// regression test -
+
+// simplified from bug report by Leon Bottou <leonb@research.att.com>
+// by Paul Burchard <burchard@pobox.com>, Level Set Systems, Inc.
+// Copyright (C) 1999 Free Software Foundation
+
+struct A {
+ template <class T>
+ struct B {
+ T x;
+ };
+ template <class T>
+ struct C : B<T> {
+ C() {}
+ };
+};
+
+