| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O3" } */ |
| 3 |
|
| 4 |
/* The bug only presented itself on a 32 bit i386 but in theory it might also |
| 5 |
pop up elsewhere and we do not want to put -m32 options to testcase |
| 6 |
options. */ |
| 7 |
|
| 8 |
struct A |
| 9 |
{ |
| 10 |
virtual int a (int, int = 0) = 0; |
| 11 |
void b (); |
| 12 |
void c (); |
| 13 |
int d; |
| 14 |
}; |
| 15 |
|
| 16 |
struct B : virtual A |
| 17 |
{ |
| 18 |
int a (int, int); |
| 19 |
int e; |
| 20 |
}; |
| 21 |
|
| 22 |
int f; |
| 23 |
|
| 24 |
void |
| 25 |
A::b () |
| 26 |
{ |
| 27 |
a (0); |
| 28 |
} |
| 29 |
|
| 30 |
void |
| 31 |
A::c () |
| 32 |
{ |
| 33 |
a (f); |
| 34 |
} |
| 35 |
|
| 36 |
int |
| 37 |
B::a (int, int) |
| 38 |
{ |
| 39 |
return e; |
| 40 |
} |