crash44.C: Remove XFAIL.
authorNathan Sidwell <nathan@codesourcery.com>
Thu, 17 Aug 2000 12:24:24 +0000 (12:24 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Thu, 17 Aug 2000 12:24:24 +0000 (12:24 +0000)
* g++.old-deja/g++.pt/crash44.C: Remove XFAIL. Add ERROR.
* g++.old-deja/g++.pt/friend38.C: Remove XFAIL. Add extra test.
* g++.old-deja/g++.pt/friend45.C: New test.
* g++.old-deja/g++.other/friend8.C: New test.

From-SVN: r35754

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/friend8.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.pt/crash44.C
gcc/testsuite/g++.old-deja/g++.pt/friend38.C
gcc/testsuite/g++.old-deja/g++.pt/friend45.C [new file with mode: 0644]

index 7199ee4966b106bcdd873feb1e2dd4ff4d615387..e99e2797ee8ec39306855775128483f1847d4d56 100644 (file)
@@ -1,3 +1,10 @@
+2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * g++.old-deja/g++.pt/crash44.C: Remove XFAIL. Add ERROR.
+       * g++.old-deja/g++.pt/friend38.C: Remove XFAIL. Add extra test.
+       * g++.old-deja/g++.pt/friend45.C: New test.
+       * g++.old-deja/g++.other/friend8.C: New test.
+
 2000-08-15  Richard Henderson  <rth@cygnus.com>
 
        * gcc.c-torture/execute/20000815-1.c: New test.
diff --git a/gcc/testsuite/g++.old-deja/g++.other/friend8.C b/gcc/testsuite/g++.old-deja/g++.other/friend8.C
new file mode 100644 (file)
index 0000000..5da7183
--- /dev/null
@@ -0,0 +1,16 @@
+// Build don't link:
+// 
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 14 Aug 2000 <nathan@codesourcery.com>
+
+// We failed to diagnose when a class friend declaration did not use an
+// elaborated type specifier.
+
+struct Y;
+struct Z;
+struct X
+{
+  friend class Z;
+  friend Y;         // ERROR - friend must use aggr tag
+};
+
index 3e7b175465932be422e40d3361c18bc956472f7c..9fba1bcafac3bd9efbf11dac2e795de94525b41a 100644 (file)
@@ -1,13 +1,11 @@
 // Build don't link:
 // Origin: Mark Mitchell <mark@codesourcery.com>
 
-// crash test - XFAIL *-*-*
-
 template <class T>
 struct S 
 {
   template <class U>
-  friend S<U>;
+  friend S<U>;            // ERROR - friend must use tag
 };
 
 template struct S<int>;
index e3a6a060ef6afd2da2c57c037ffca3d3f61e1e1b..a7363013f3b698a437df48af003043e7c451c72f 100644 (file)
@@ -2,7 +2,8 @@
 
 // Overly simplified from testcase by "B. K. Oxley" <binkley@bigfoot.com>
 
-template<class P> struct foo {
+template<class P, class Q> struct foo {
   typedef P parent_type;
-  friend parent_type; // ERROR - template parameters cannot be friends - XFAIL *-*-*
+  friend parent_type; // ERROR - template parameters cannot be friends
+  friend Q;           // ERROR - template parameters cannot be friends
 };
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/friend45.C b/gcc/testsuite/g++.old-deja/g++.pt/friend45.C
new file mode 100644 (file)
index 0000000..17f8dd5
--- /dev/null
@@ -0,0 +1,13 @@
+// Build don't link:
+// 
+// Copyright (C) 2000 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 14 Aug 2000 <nathan@codesourcery.com>
+
+// bug 42. We ICE'd on instantiating a template with a bogus templated friend.
+
+template<typename T> struct X
+{
+  template<typename D> friend X<D>;         // ERROR - friend must use aggr tag
+};
+
+X<int> g;