X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.mike%2Fp658.C;fp=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.mike%2Fp658.C;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=b9137fb8ca2fcf150c0fb5afe61d5aaffb8e2a7d;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git 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 b9137fb8..00000000 --- a/gcc/testsuite/g++.old-deja/g++.mike/p658.C +++ /dev/null @@ -1,102 +0,0 @@ -// prms-id: 658 - -#include -#include - -/* We may not find the libg++ . */ -#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) { - std::cerr << "FAILURE - reference was made to a destructed object\n"; - std::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; -} - -