| 1 |
// { dg-do compile } |
| 2 |
// { dg-options "-O3" } |
| 3 |
|
| 4 |
class ASN1Object |
| 5 |
{ |
| 6 |
public: |
| 7 |
virtual ~ASN1Object (); |
| 8 |
}; |
| 9 |
class A |
| 10 |
{ |
| 11 |
virtual unsigned m_fn1 () const; |
| 12 |
}; |
| 13 |
class B |
| 14 |
{ |
| 15 |
public: |
| 16 |
ASN1Object Element; |
| 17 |
virtual unsigned m_fn1 (bool) const; |
| 18 |
}; |
| 19 |
template <class BASE> class C : public BASE |
| 20 |
{ |
| 21 |
}; |
| 22 |
|
| 23 |
class D : ASN1Object, public B |
| 24 |
{ |
| 25 |
}; |
| 26 |
class G : public D |
| 27 |
{ |
| 28 |
unsigned m_fn1 (bool) const { return 0; } |
| 29 |
}; |
| 30 |
class F : A |
| 31 |
{ |
| 32 |
public: |
| 33 |
F (A); |
| 34 |
unsigned m_fn1 () const |
| 35 |
{ |
| 36 |
int a; |
| 37 |
a = m_fn2 ().m_fn1 (0); |
| 38 |
return a; |
| 39 |
} |
| 40 |
const B &m_fn2 () const { return m_groupParameters; } |
| 41 |
C<G> m_groupParameters; |
| 42 |
}; |
| 43 |
template <class D> void BenchMarkKeyAgreement (int *, int *, int) |
| 44 |
{ |
| 45 |
A f; |
| 46 |
D d (f); |
| 47 |
} |
| 48 |
|
| 49 |
void BenchmarkAll2 () { BenchMarkKeyAgreement<F>(0, 0, 0); } |
| 50 |
|