new
authorJason Merrill <jason@gcc.gnu.org>
Wed, 13 Sep 2000 00:59:16 +0000 (20:59 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 13 Sep 2000 00:59:16 +0000 (20:59 -0400)
From-SVN: r36381

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

diff --git a/gcc/testsuite/g++.old-deja/g++.pt/inherit2.C b/gcc/testsuite/g++.old-deja/g++.pt/inherit2.C
new file mode 100644 (file)
index 0000000..46637a1
--- /dev/null
@@ -0,0 +1,20 @@
+// Test that we warn about unqualified references to implicit typenames.
+// Bug: g++ is confused by the binding for ::AN and crashes.
+// Special g++ Options:
+// crash test - XFAIL *-*-*
+
+template <class T> struct A {
+  struct AA { };
+  struct AB { };
+  struct AC { };
+};
+
+template <class T> struct B: public A<T> {
+  friend struct B::AA;         // OK
+  friend AB;                   // WARNING - needs class-key
+  friend struct AC;            // WARNING - refers to ::AC
+};
+
+B<int> b;
+
+int main () { }