]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - gcc/testsuite/g++.old-deja/g++.brendan/template3.C
Imported gcc-4.4.3
[msp430-gcc.git] / gcc / testsuite / g++.old-deja / g++.brendan / template3.C
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/template3.C b/gcc/testsuite/g++.old-deja/g++.brendan/template3.C
deleted file mode 100644 (file)
index 6fec8d8..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-// GROUPS passed templates
-extern "C" int printf (const char *, ...);
-extern "C" void exit (int);
-
-int count = 0;
-
-void
-die (int x)
-{
-  if (x != ++count)
-    {
-      printf ("FAIL\n");
-      exit (1);
-    }
-}
-
-class A {
-  public:
-    void   f() const { die (-1); }
-};
-
-
-template <class Item>
-class B : public A {
-  public:
-  void f() const;
-};
-
-template <class Item>
-inline void B<Item>::f() const { die (1); }
-
-template <class Item>
-class C : public A {
-  public:
-    void f() const { die (2); }
-};
-
-
-int main()
-{
-    B<int> b;
-    C<int> c;
-
-    b.f(); //- bugged, (A::f() called instead of B::f())
-    c.f(); //- works fine (C::f() called)
-
-    printf ("PASS\n");
-    return 0;
-}