2018-05-17 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr71437.c
blob66a540532708fe449e8b5c3154d30582ee9c474b
1 /* { dg-do compile } */
2 /* { dg-options "-ffast-math -O3 -fdump-tree-vrp1-details" } */
4 int I = 50, J = 50;
5 int S, L;
6 const int *pL;
7 const int *pS;
9 void bar (float, float);
11 void foo (int K)
13 int k, i, j;
14 static float LD, SD;
15 for (k = 0 ; k < K; k++)
17 for( i = 0 ; i < ( I - 1 ) ; i++ )
19 if( ( L < pL[i+1] ) && ( L >= pL[i] ) )
20 break ;
23 if( i == ( I - 1 ) )
24 L = pL[i] ;
25 LD = (float)( L - pL[i] ) /
26 (float)( pL[i + 1] - pL[i] ) ;
28 for( j = 0 ; j < ( J-1 ) ; j++ )
30 if( ( S < pS[j+1] ) && ( S >= pS[j] ) )
31 break ;
34 if( j == ( J - 1 ) )
35 S = pS[j] ;
36 SD = (float)( S - pS[j] ) /
37 (float)( pS[j + 1] - pS[j] ) ;
39 bar (LD, SD);
42 /* { dg-final { scan-tree-dump-times "Threaded jump " 2 "vrp1" } } */