| 1 |
// PR rtl-optimization/59647 |
| 2 |
// { dg-do compile } |
| 3 |
// { dg-options "-O2 -fno-tree-vrp" } |
| 4 |
// { dg-additional-options "-msse2 -mfpmath=sse" { target { { i?86-*-* x86_64-*-* } && ia32 } } } |
| 5 |
|
| 6 |
void f1 (int); |
| 7 |
void f2 (); |
| 8 |
double f3 (int); |
| 9 |
|
| 10 |
struct A |
| 11 |
{ |
| 12 |
int f4 () const |
| 13 |
{ |
| 14 |
if (a == 0) |
| 15 |
return 1; |
| 16 |
return 0; |
| 17 |
} |
| 18 |
unsigned f5 () |
| 19 |
{ |
| 20 |
if (!f4 ()) |
| 21 |
f2 (); |
| 22 |
return a; |
| 23 |
} |
| 24 |
int a; |
| 25 |
}; |
| 26 |
|
| 27 |
void |
| 28 |
f6 (A *x) |
| 29 |
{ |
| 30 |
unsigned b = x->f5 (); |
| 31 |
f1 (b - 1 - f3 (x->f5 () - 1U)); |
| 32 |
} |