aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr60640-1.C
blob: 7a0b91893f8d4cf580eb004b68ea59d52cdae9e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// { dg-do compile }
// { dg-options "-O3" }

class ASN1Object
{
public:
  virtual ~ASN1Object ();
};
class A
{
  virtual unsigned m_fn1 () const;
};
class B
{
public:
  ASN1Object Element;
  virtual unsigned m_fn1 (bool) const;
};
template <class BASE> class C : public BASE
{
};

class D : ASN1Object, public B
{
};
class G : public D
{
  unsigned m_fn1 (bool) const {}
};
class F : A
{
public:
  F (A);
  unsigned m_fn1 () const
  {
    int a;
    a = m_fn2 ().m_fn1 (0);
    return a;
  }
  const B &m_fn2 () const { return m_groupParameters; }
  C<G> m_groupParameters;
};
template <class D> void BenchMarkKeyAgreement (int *, int *, int)
{
  A f;
  D d (f);
}

void BenchmarkAll2 () { BenchMarkKeyAgreement<F>(0, 0, 0); }