2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / excess-precision-2.c
blobb5035e5a1fe325810de36518e43be7e681c18147
1 /* Excess precision tests. Test excess precision of constants. */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -mfpmath=387 -fexcess-precision=standard" } */
5 #include <float.h>
7 extern void abort (void);
8 extern void exit (int);
10 volatile long double ldadd1 = 1.0l + 0x1.0p-30l;
11 volatile long double ld11f = 1.1f;
12 volatile long double ld11d = 1.1;
13 volatile long double ld11 = 1.1;
15 void
16 test_const (void)
18 if (1.0f + 0x1.0p-30f != ldadd1)
19 abort ();
20 if (ld11f != ld11)
21 abort ();
22 if (ld11d != ld11)
23 abort ();
24 if (1.1f != ld11)
25 abort ();
28 int
29 main (void)
31 test_const ();
32 exit (0);