1// prms-id: 4667 2 3int counter = 0; 4int a = 0; 5int b = 0; 6int c = 0; 7 8struct A { 9 A() { a = counter++; } 10}; 11 12struct B { 13 B() { b = counter++; } 14}; 15 16struct C : public virtual B { 17 C() { c = counter++; } 18}; 19 20struct D : public virtual A, public virtual C { }; 21 22extern "C" int printf(const char*,...); 23int main(void) { 24 D d; 25 26 if (!(a == 0 && b == 1 && c == 2)) { 27 return 1; 28 } 29 30 return 0; 31} 32