externC4.C, friend10.C: New tests.
authorNeil Booth <neilb@earthling.net>
Sat, 2 Dec 2000 18:22:02 +0000 (18:22 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sat, 2 Dec 2000 18:22:02 +0000 (18:22 +0000)
        * g++.old-deja/g++.other/externC4.C,
        g++.old-deja/g++.other/friend10.C: New tests.

From-SVN: r37955

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/externC4.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/friend10.C [new file with mode: 0644]

index 716abf44f2f325c20b2d3974eef1120e0e0c2a89..0b5b35b9d1e4dbccb1248a5f430e1f3da876ba6d 100644 (file)
@@ -1,3 +1,8 @@
+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
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 (file)
index 0000000..5a0d0f8
--- /dev/null
@@ -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 (file)
index 0000000..75b52cb
--- /dev/null
@@ -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());
+   }
+ }