1 /* { dg-do run } */
2 /* { dg-options "-O2 -ffast-math" } */
3
4 extern void abort (void);
5
6 int foo ( float* dists, int k)
7 {
8 if ( ( dists [ 0 ] > 0 ) == ( dists [ 1 ] > 0 ) )
9 return k;
10 return 0;
11 }
12 int
13 main() {
14 float dists[16] = { 0., 1., 1., 0., 0., -1., -1., 0.,
15 1., 1., 1., -1., -1., 1., -1., -1. };
16 if ( foo(&dists[0], 1) +
17 foo(&dists[2], 2) +
18 foo(&dists[4], 4) +
19 foo(&dists[6], 8) +
20 foo(&dists[8], 16) +
21 foo(&dists[10], 32) +
22 foo(&dists[12], 64) +
23 foo(&dists[14], 128)
24 != 156)
25 abort();
26 return 0;
27 }