2 // { dg-options "-O2" }
4 // The size of the construction vtable for YFont in YCoreFont was not
5 // updated to reflect its actual size. On targets with section anchor
6 // support, the vtable for YCoreFont was laid out immediately after
7 // that, but the compiler thought it was about 40 bytes closer to the
8 // anchor than it actually was.
10 extern "C" void abort (void);
17 refcounted(): __refcount(0) {};
18 virtual ~refcounted() {}
21 class YFont : public virtual refcounted {
25 virtual int ascent() const = 0;
31 class YCoreFont : public YFont {
33 YCoreFont(char const * name);
36 virtual int ascent() const { return 2; }
42 YCoreFont::YCoreFont(char const * name) {
45 YCoreFont::~YCoreFont() {
48 int foo(YCoreFont *ycf)
50 return ycf->ascent ();