aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2000-08-17 12:24:24 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2000-08-17 12:24:24 +0000
commit07745bdb36b003562aadda9564917e0413c7b403 (patch)
tree974d87c83f3642ccf2a872770d66aef190643723
parent80959c3ff48ef069eed2109ea12e81980a8c931f (diff)
downloadgcc-07745bdb36b003562aadda9564917e0413c7b403.zip
gcc-07745bdb36b003562aadda9564917e0413c7b403.tar.gz
gcc-07745bdb36b003562aadda9564917e0413c7b403.tar.bz2
crash44.C: Remove XFAIL.
* 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
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/friend8.C16
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/crash44.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/friend38.C5
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/friend45.C13
5 files changed, 40 insertions, 5 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7199ee4..e99e279 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..5da7183
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/friend8.C
@@ -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
+};
+
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash44.C b/gcc/testsuite/g++.old-deja/g++.pt/crash44.C
index 3e7b175..9fba1bc 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/crash44.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash44.C
@@ -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>;
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/friend38.C b/gcc/testsuite/g++.old-deja/g++.pt/friend38.C
index e3a6a06..a736301 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/friend38.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/friend38.C
@@ -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
index 0000000..17f8dd5
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.pt/friend45.C
@@ -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;