X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fg%2B%2B.dg%2Fopt%2Fthunk1.C;fp=gcc%2Ftestsuite%2Fg%2B%2B.dg%2Fopt%2Fthunk1.C;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=566c0f2fcc5d8e7ce6a9d0c290e63aa94c2b0570;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/g++.dg/opt/thunk1.C b/gcc/testsuite/g++.dg/opt/thunk1.C deleted file mode 100644 index 566c0f2f..00000000 --- a/gcc/testsuite/g++.dg/opt/thunk1.C +++ /dev/null @@ -1,42 +0,0 @@ -// PR 6788 -// Test that the thunk adjusts the this pointer properly. -// { dg-do run } - -extern "C" void abort (); - -struct A -{ - virtual void foo() = 0; - char large[33*1024]; -}; - -struct B -{ - virtual void foo() = 0; -}; - -struct C : public A, public B -{ - virtual void foo(); -}; - -static C *match; - -void C::foo() -{ - if (this != match) - abort (); -} - -void bar(B *x) -{ - x->foo(); -} - -int main() -{ - C obj; - match = &obj; - bar(&obj); - return 0; -}