new
authorJason Merrill <jason@gcc.gnu.org>
Mon, 10 Aug 1998 12:39:12 +0000 (08:39 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 10 Aug 1998 12:39:12 +0000 (08:39 -0400)
From-SVN: r21654

gcc/testsuite/g++.old-deja/g++.pt/lookup3.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/t35a.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/test4.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/typename9.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.pt/lookup3.C b/gcc/testsuite/g++.old-deja/g++.pt/lookup3.C
new file mode 100644 (file)
index 0000000..9ada72f
--- /dev/null
@@ -0,0 +1,17 @@
+template<class T>
+class A {
+public:
+  void f() { }
+};
+
+class B : public A<int> {
+public:
+  void f();
+};
+
+int main()
+{
+  B b;
+  B& b1 = b;
+  b1.A<int>::f();
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/t35a.C b/gcc/testsuite/g++.old-deja/g++.pt/t35a.C
new file mode 100644 (file)
index 0000000..40fba4d
--- /dev/null
@@ -0,0 +1,5 @@
+// Build don't link: 
+
+template <class X> struct A {  };
+struct A<int> { int foo (); };
+int A<int>::foo () { return 37; }
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/test4.C b/gcc/testsuite/g++.old-deja/g++.pt/test4.C
new file mode 100644 (file)
index 0000000..f4c2a20
--- /dev/null
@@ -0,0 +1,4 @@
+// Build don't link: 
+
+class B { };
+template <class x, int b> class X : public B { int y[b]; };
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/typename9.C b/gcc/testsuite/g++.old-deja/g++.pt/typename9.C
new file mode 100644 (file)
index 0000000..027d0a0
--- /dev/null
@@ -0,0 +1,16 @@
+// Test to make sure that implicit typename doesn't break name binding rules.
+// Special g++ Options: -w
+
+typedef double A;
+template<class T> class B {
+  typedef char A;
+};
+template<class T> struct X : B<T> {
+  A a;
+};
+
+int main()
+{
+  X<char*> x;
+  return sizeof (x.a) != sizeof (double);
+}