2017-12-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr23115.c
blob61408e47a8094a3714b356a7e0f87a7c08f11ab5
1 /* { dg-do run } */
2 /* { dg-options "-O2 -ftree-vectorize" } */
4 extern void abort (void);
6 #define MIN2(a,b) (((a)<(b)) ? (a) : (b))
7 #define MAX2(a,b) (((a)>(b)) ? (a) : (b))
9 double p[2] = { 4., 5. };
11 int main()
13 long j;
14 double R, n, x;
15 #if __SIZEOF_DOUBLE__ >= 8
16 n = 1.e300;
17 x = -1.e300;
18 #else
19 n = 1.e30;
20 x = -1.e30;
21 #endif
22 for( j=0; j < 2; j++ )
24 x = MAX2(x,p[j]);
25 n = MIN2(n,p[j]);
27 R = x-n;
29 if( R < 0.1 )
30 abort ();
32 return 0;