| 1 |
/* { dg-do compile } */ |
| 2 |
class A { |
| 3 |
public: |
| 4 |
A(int, int); |
| 5 |
}; |
| 6 |
class B { |
| 7 |
public: |
| 8 |
void m_fn1(bool, const int *, int &); |
| 9 |
unsigned m_fn2(); |
| 10 |
}; |
| 11 |
namespace { |
| 12 |
class C { |
| 13 |
B &VTables; |
| 14 |
void m_fn3(A, unsigned, const int *, int &); |
| 15 |
|
| 16 |
public: |
| 17 |
int VFTableBuilder_VisitedBases; |
| 18 |
B VFTableBuilder_VTables; |
| 19 |
C() : VTables(VFTableBuilder_VTables) { |
| 20 |
m_fn3(A(0, 0), 0, 0, VFTableBuilder_VisitedBases); |
| 21 |
} |
| 22 |
}; |
| 23 |
} |
| 24 |
int a; |
| 25 |
void C::m_fn3(A, unsigned, const int *, int &) { |
| 26 |
for (;;) |
| 27 |
1 ? VTables.m_fn2() : 0; |
| 28 |
} |
| 29 |
void B::m_fn1(bool, const int *, int &) { C(); } |
| 30 |
unsigned B::m_fn2() { m_fn1(0, 0, a); return 0; } |