* 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
+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.
--- /dev/null
+// 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
+};
+
// 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>;
// 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
};
--- /dev/null
+// 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;