2 // { dg-options "-O2" }
3 // { dg-skip-if "requires hosted libstdc++ for cstdio" { ! hostedlib } }
5 // Copyright (C) 2001 Free Software Foundation, Inc.
6 // Contributed by Nathan Sidwell 26 May 2001 <nathan@codesourcery.com>
8 // Bug 2823. Inlineing the body of a thunk broke things. But that's
9 // rarely a sensible thing to do anyway.
21 Thing (Thing const &src);
31 std::printf ("%p %s\n", (void *)this,__PRETTY_FUNCTION__);
34 Thing::Thing (Thing const &src)
38 std::printf ("%p %s\n", (void *)this, __PRETTY_FUNCTION__);
43 std::printf ("%p %s\n", (void *)this, __PRETTY_FUNCTION__);
58 virtual void test(const Thing& s) = 0;
61 class Impl : virtual public Base
64 virtual void test(const Thing& s)
66 x(s); // copy construct temporary
72 Impl *impl = new Impl();
74 impl->test( Thing ()); // This will use a thunk