summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/externC4.C14
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/friend10.C30
3 files changed, 49 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 716abf44f2f..0b5b35b9d1e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2000-12-02 Neil Booth <neilb@earthling.net>
+ * g++.old-deja/g++.other/externC4.C,
+ g++.old-deja/g++.other/friend10.C: New tests.
+
+2000-12-02 Neil Booth <neilb@earthling.net>
+
* g++.old-deja/g++.other/instan2.C
* g++.old-deja/g++.other/instan3.C: New test.
diff --git a/gcc/testsuite/g++.old-deja/g++.other/externC4.C b/gcc/testsuite/g++.old-deja/g++.other/externC4.C
new file mode 100644
index 00000000000..5a0d0f84115
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/externC4.C
@@ -0,0 +1,14 @@
+// Build don't link:
+// Origin: Neil Booth, from PR #66
+
+extern "C"
+{
+ class foo
+ {
+ public:
+ ~foo ();
+ void bar (foo *);
+ foo ();
+ };
+}
+
diff --git a/gcc/testsuite/g++.old-deja/g++.other/friend10.C b/gcc/testsuite/g++.old-deja/g++.other/friend10.C
new file mode 100644
index 00000000000..75b52cb1ec7
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/friend10.C
@@ -0,0 +1,30 @@
+// Build don't link:
+// Origin: Neil Booth, from PR #78
+
+namespace MySpace
+ {
+ class Tag1 { };
+ class Tag2 { };
+
+ template<class Tag>
+ class Object
+ {
+ public:
+
+ friend void Forgotten(Object const & m) {}
+ };
+
+ typedef Object<Tag1> U1;
+ typedef Object<Tag2> U2;
+
+ void foo()
+ {
+ Forgotten(U1());
+ Forgotten(U2());
+ }
+
+ void bar()
+ {
+ Forgotten(U1());
+ }
+ }
OpenPOWER on IntegriCloud