2 // { dg-options "-O2" }
4 // Copyright (C) 2001 Free Software Foundation, Inc.
5 // Contributed by Nathan Sidwell 26 May 2001 <nathan@codesourcery.com>
7 // Bug 2823. Inlineing the body of a thunk broke things. But that's
8 // rarely a sensible thing to do anyway.
20 Thing (Thing const &src);
30 std::printf ("%p %s\n", (void *)this,__PRETTY_FUNCTION__);
33 Thing::Thing (Thing const &src)
37 std::printf ("%p %s\n", (void *)this, __PRETTY_FUNCTION__);
42 std::printf ("%p %s\n", (void *)this, __PRETTY_FUNCTION__);
57 virtual void test(const Thing& s) = 0;
60 class Impl : virtual public Base
63 virtual void test(const Thing& s)
65 x(s); // copy construct temporary
71 Impl *impl = new Impl();
73 impl->test( Thing ()); // This will use a thunk