summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.mike/p658.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.mike/p658.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p658.C101
1 files changed, 0 insertions, 101 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p658.C b/gcc/testsuite/g++.old-deja/g++.mike/p658.C
deleted file mode 100644
index 14658f04956..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.mike/p658.C
+++ /dev/null
@@ -1,101 +0,0 @@
-// prms-id: 658
-
-#include <ostream.h>
-
-extern "C" void abort();
-
-/* We may not find the libg++ <bool.h>. */
-#ifndef FALSE
-#define FALSE false
-#endif
-#ifndef TRUE
-#define TRUE true
-#endif
-
-class Object {
-public:
- Object();
- Object(const Object&);
- ~Object();
-
- void OK() const;
-private:
- bool _destructed;
-};
-
-class Char: public Object {
-public:
- Char();
- Char(char);
- Char(const Char&);
- ~Char();
-
- operator char () const;
-private:
- char _c;
-};
-
-int main()
-{
- Char r, s;
-
- r = Char('r');
- s = Char('s');
-}
-
-//
-// Object stuff
-//
-Object::Object():
-_destructed(FALSE)
-{}
-
-Object::Object(const Object& other):
-_destructed(FALSE)
-{
- other.OK();
-}
-
-Object::~Object()
-{
- OK();
- _destructed = TRUE;
-}
-
-void
-Object::OK() const
-{
- if (_destructed) {
- cerr << "FAILURE - reference was made to a destructed object\n";
- abort();
- }
-}
-
-//
-// Char stuff
-//
-
-Char::Char():
-Object(),
-_c('a')
-{ }
-
-Char::Char(char c):
-Object(),
-_c(c)
-{ }
-
-Char::Char(const Char& other):
-Object(other),
-_c(other._c)
-{ }
-
-Char::~Char()
-{
- OK();
-}
-
-Char::operator char () const
-{
- return _c;
-}