X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.brendan%2Foperators5.C;fp=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.brendan%2Foperators5.C;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=d4c89605d430bdd41eaa931adae7ddc7f7d85b21;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/operators5.C b/gcc/testsuite/g++.old-deja/g++.brendan/operators5.C deleted file mode 100644 index d4c89605..00000000 --- a/gcc/testsuite/g++.old-deja/g++.brendan/operators5.C +++ /dev/null @@ -1,52 +0,0 @@ -// GROUPS passed operators -// Check that operators may be (directly) recursive. - -extern "C" int printf (const char *, ...); - -struct base { - int i; -}; - -base base_variable; - -base operator+ (const base& left, const base& right) -{ - base ret_val; - - ret_val.i = left.i + right.i; - return ret_val; -} - -base operator- (const base& left, int right) -{ - base ret_val; - - ret_val.i = left.i - right; - return ret_val; -} - -// Define the unary ! operator for class base to be the fibonachi -// operator. - -base operator! (const base& right) -{ - if (right.i < 2) - return right; - else - return ((!(right-1)) + (!(right-2))); -} - -int main () -{ - base k; - - k.i = 15; - k = !k; // fib it! - - if (k.i != 610) - { printf ("FAIL\n"); return 1; } - else - printf ("PASS\n"); - - return 0; -}