* g++.old-deja/g++.pt (typename25.C): New test.
authorNathan Sidwell <nathan@codesourcery.com>
Mon, 3 Jul 2000 08:14:03 +0000 (08:14 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Mon, 3 Jul 2000 08:14:03 +0000 (08:14 +0000)
From-SVN: r34843

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.pt/typename25.C [new file with mode: 0644]

index 78e9f73..3f8342c 100644 (file)
@@ -1,3 +1,7 @@
+2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * g++.old-deja/g++.pt (typename25.C): New test.
+
 2000-07-02  Zack Weinberg  <zack@wolery.cumb.org
 
        * gcc.c-torture/compile/20000701-1.c: New test.
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/typename25.C b/gcc/testsuite/g++.old-deja/g++.pt/typename25.C
new file mode 100644 (file)
index 0000000..eb3b4ee
--- /dev/null
@@ -0,0 +1,32 @@
+// Build don't link:
+// Special g++ Options: 
+// Copyright (C) 2000 Free Software Foundation
+// Adapted by Nathan Sidwell 1 July 2000 <nathan@codesourcery.com>
+// Derived from a bug report by scott snyder <snyder@fnal.gov>
+// Our implicit typename extension was causing this pedantically
+// correct program to fail
+
+struct list
+{
+  typedef int reference;
+};
+
+class d0_Collection_Base {};
+
+
+template <class T>
+class d0_List_1
+  : virtual public d0_Collection_Base,
+    public list
+{
+public:
+  typedef int reference;
+};
+
+template <class T>
+class d0_List
+{
+public:
+  typedef d0_List_1<T> Base;
+  typedef typename Base::reference              reference;
+};