2 // Test that we only call f once and that pointers to different subobjects
3 // compare as different.
5 struct A { void f() { } };
6 struct B: public A { };
7 struct C: public A { };
8 struct D : public B, public C { };
10 typedef void (B::*bp)();
11 typedef void (C::*cp)();
12 typedef void (D::*dp)();
18 dp f () { ++call; return d1; }
26 return (f() == d2 || call != 1);