gcc/testsuite/gcc.target/i386/20030217-2.c
raw| 1 | /* Test whether denormal floating point constants in hexadecimal notation |
| 2 | are parsed correctly. */ |
| 3 | /* { dg-do run } */ |
| 4 | /* { dg-options "-std=c99" } */ |
| 5 | |
| 6 | long double d; |
| 7 | long double e; |
| 8 | |
| 9 | long double f = 2.2250738585072014E-308L; |
| 10 | |
| 11 | extern void abort (void); |
| 12 | extern void exit (int); |
| 13 | |
| 14 | int |
| 15 | main (void) |
| 16 | { |
| 17 | d = 0x0.0000003ffffffff00000p-1048L; |
| 18 | e = 0x0.0000003ffffffff00000p-1047L; |
| 19 | if (d != e / 2.0) |
| 20 | abort (); |
| 21 | |
| 22 | exit (0); |
| 23 | } |