aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61654.C
blob: d07e4586bdbac95b4aac4b012825df68ddb49c0c (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
/* { dg-do compile } */
/* { dg-options "-O3" } */

/* The bug only presented itself on a 32 bit i386 but in theory it might also
   pop up elsewhere and we do not want to put -m32 options to testcase
   options.  */

struct A
{
  virtual int a (int, int = 0) = 0;
  void b ();
  void c ();
  int d;
};

struct B : virtual A
{
  int a (int, int);
  int e;
};

int f;

void
A::b ()
{
  a (0);
}

void
A::c ()
{
  a (f);
}

int
B::a (int, int)
{
  return e;
}