1 /* PR tree-optimization/79389 */
2 /* { dg-do compile } */
3 /* { dg-options "-O3 -fdump-tree-split-paths-details" } */
16 Random_struct
, *Random
;
18 Random
new_Random_seed(int seed
);
19 double Random_nextDouble(Random R
);
20 void Random_delete(Random R
);
22 static const int SEED
= 113;
24 double MonteCarlo_integrate(int Num_samples
)
28 Random R
= new_Random_seed(SEED
);
34 for (count
=0; count
<Num_samples
; count
++)
36 double x
= Random_nextDouble(R
);
37 double y
= Random_nextDouble(R
);
39 if ( x
*x
+ y
*y
<= 1.0)
46 return ((double) under_curve
/ Num_samples
) * 4.0;
49 /* { dg-final { scan-tree-dump-times "Duplicating join block" 0 "split-paths" } } */