Merge from trunk
[official-gcc.git] / gcc / testsuite / g++.dg / opt / pr59647.C
blob1fc5067d83fc57a4cadbc8818505e5f7d2dd6e9f
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 } } }
6 void f1 (int);
7 void f2 ();
8 double f3 (int);
10 struct A
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;
27 void
28 f6 (A *x)
30   unsigned b = x->f5 ();
31   f1 (b - 1 - f3 (x->f5 () - 1U));