111
|
1 /* { dg-do compile } */
|
|
2 /* { dg-options "-O1 -fno-trapping-math -funsafe-math-optimizations -fdump-tree-recip" } */
|
|
3
|
|
4 double F[2] = { 0.0, 0.0 }, e;
|
|
5
|
|
6 /* In this case the optimization is interesting. */
|
|
7 float h ()
|
|
8 {
|
|
9 int i;
|
|
10 double E, W, P, d;
|
|
11
|
|
12 W = 1.1;
|
|
13 d = 2.*e;
|
|
14 E = 1. - d;
|
|
15
|
|
16 for( i=0; i < 2; i++ )
|
|
17 if( d > 0.01 )
|
|
18 {
|
|
19 P = ( W < E ) ? (W - E)/d : (E - W)/d;
|
|
20 F[i] += P;
|
|
21 }
|
|
22
|
|
23 F[0] += E / d;
|
|
24 }
|
|
25
|
|
26 /* { dg-final { scan-tree-dump-times " / " 1 "recip" } } */
|