* g++.old-deja/g++.pt/syntax1.C: New test.
* g++.old-deja/g++.pt/syntax2.C: New test.
* g++.old-deja/g++.other/syntax3.C: New test.
* g++.old-deja/g++.other/syntax4.C: New test.
From-SVN: r34708
+2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
+
+ * g++.old-deja/g++.pt/syntax1.C: New test.
+ * g++.old-deja/g++.pt/syntax2.C: New test.
+ * g++.old-deja/g++.other/syntax3.C: New test.
+ * g++.old-deja/g++.other/syntax4.C: New test.
+
2000-06-25 Zack Weinberg <zack@wolery.cumb.org>
* gcc.dg/20000623-1.c: Prototype exit and abort.
--- /dev/null
+// Build don't link:
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 22 June 2000 <nathan@codesourcery.com>
+
+// Origin GNATS bug report 262 from Jeremy Sanders <jss@ast.cam.ac.uk>
+// and several others. With templates, it's very easy to say something
+// erroneous like
+// template class X::X<whatever>
+// The culprit
+// ... class X::X ...
+// caused us to ICE as we got confused about pushing and popping scopes.
+
+class X
+{
+ public:
+ X();
+};
+
+class X::X () {} // ERROR - parse error
+X::X () {}
--- /dev/null
+// Build don't link:
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 22 June 2000 <nathan@codesourcery.com>
+
+// Origin GNATS bug report 262 from Jeremy Sanders <jss@ast.cam.ac.uk>
+// and several others. With templates, it's very easy to say something
+// erroneous like
+// template class X::X<whatever>
+// The culprit
+// ... class X::X ...
+// caused us to ICE as we got confused about pushing and popping scopes.
+
+class X {
+ X ();
+};
+
+class Y {
+ public:
+ typedef ::X W;
+ class Z;
+};
+
+class Y::Z {};
+class Y::W () {} // ERROR - parse error
+Y::W::X () {}
--- /dev/null
+// Build don't link:
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 22 June 2000 <nathan@codesourcery.com>
+
+// Origin GNATS bug report 262 from Jeremy Sanders <jss@ast.cam.ac.uk>
+// and several others. With templates, it's very easy to say something
+// erroneous like
+// template class X::X<whatever>
+// The culprit
+// ... class X::X ...
+// caused us to ICE as we got confused about pushing and popping scopes.
+
+
+
+class Y
+{
+ public:
+ template <class T> Y(T &);
+};
+template <class T> Y::Y(T &) {}
+
+template class Y::Y (int); // ERROR - parse error
+template Y::Y (int); // ERROR - template-id does not match
+template Y::Y (int &);
+
--- /dev/null
+// Build don't link:
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 22 June 2000 <nathan@codesourcery.com>
+
+// Origin GNATS bug report 262 from Jeremy Sanders <jss@ast.cam.ac.uk>
+// and several others. With templates, it's very easy to say something
+// erroneous like
+// template class X::X<whatever>
+// The culprit
+// ... class X::X ...
+// caused us to ICE as we got confused about pushing and popping scopes.
+
+template <class T> class image
+{
+public:
+ template <class U> image(const image<U> ©);
+};
+
+template <class T> template <class U> image<T>::image(const image<U> ©)
+{
+}
+
+template class image<double>;
+template class image<double>::image (const image<int> &); // ERROR - parse error
+template class image<double>::image (image<int>); // ERROR - specified as declarator-id
+template image<double>::image (const image<int> &);