X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.abi%2Fvbase4.C;fp=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.abi%2Fvbase4.C;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=116d79bec652264139a1861923e55f0ceb18db4e;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git diff --git a/gcc/testsuite/g++.old-deja/g++.abi/vbase4.C b/gcc/testsuite/g++.old-deja/g++.abi/vbase4.C deleted file mode 100644 index 116d79be..00000000 --- a/gcc/testsuite/g++.old-deja/g++.abi/vbase4.C +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (C) 2001 Free Software Foundation, Inc. -// Contributed by Nathan Sidwell 9 Jun 2001 - -// Bug 3089. We ICE'd in construction vtables. - -int failed; - -void fail (int val) -{ - if (!failed) - failed = val; -} - -struct A -{ - virtual ~A(); - A (); - virtual void check (void *whole, void *base); -}; - -A::A () -{ - check (this, this); -} -A::~A () -{ - check (this, this); -} - -void A::check (void *whole, void *base) -{ - if (dynamic_cast (this) != whole) - fail (1); - else if (this != base) - fail (2); -} - -struct B -{ - virtual ~B (); - B (); - virtual void check (void *whole, void *base); -}; - -B::B () -{ - check (this, this); -} -B::~B () -{ - check (this, this); -} -void B::check (void *whole, void *base) -{ - if (dynamic_cast (this) != whole) - fail (3); - else if (this != base) - fail (4); -} - -struct C : virtual public B, virtual public A -{ - virtual ~C (); - C (); - virtual void check (void *whole, void *base); -}; -C::C () -{ - check (this, this); -} -C::~C () -{ - check (this, this); -} -void C::check (void *whole, void *base) -{ - if (dynamic_cast (this) != whole) - fail (5); - else if (this != base) - fail (6); - A::check (whole, static_cast (this)); - B::check (whole, static_cast (this)); -} - -struct D : virtual public A -{ - virtual ~D (); - D (); - virtual void check (void *whole, void *base); -}; -D::D () -{ - check (this, this); -} -D::~D () -{ - check (this, this); -} -void D::check (void *whole, void *base) -{ - if (dynamic_cast (this) != whole) - fail (5); - else if (this != base) - fail (6); - A::check (whole, static_cast (this)); -} - -struct E : virtual public C, virtual public D -{ - virtual ~E (); - E (); - virtual void check (void *whole, void *base); -}; -E::E () -{ - check (this, this); -} -E::~E () -{ - check (this, this); -} -void E::check (void *whole, void *base) -{ - if (dynamic_cast (this) != whole) - fail (5); - else if (this != base) - fail (6); - C::check (whole, static_cast (this)); - D::check (whole, static_cast (this)); -} - -struct F : virtual public E -{ - virtual ~F (); - F (); - virtual void check (void *whole, void *base); -}; -F::F () -{ - check (this, this); -} -F::~F () -{ - check (this, this); -} -void F::check (void *whole, void *base) -{ - if (dynamic_cast (this) != whole) - fail (5); - else if (this != base) - fail (6); - E::check (whole, static_cast (this)); -} - -int main () -{ - A a; - B b; - C c; - D d; - E e; - F f; - - return failed; -}