OSDN Git Service

Backported from mainline
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / fltconst-2.c
1 /* { dg-do compile } */
2 /* { dg-options "-std=gnu99" } */
3
4 /* Check that d or D is recognized as a float constant suffix.  */
5
6 double d = 0.5d;
7 double D = 0.5D;
8
9 /* Check that d or D is recognized in a hexadecimal floating constant.  */
10
11 double hd1 = 0x1.8p1d;
12 double hd2 = 0x1.p+1D;
13 double hd3 = 0x0.8p-1d;
14
15 /* Check that imaginary constant suffixes are still recognized with
16    only i, I, j, or J.  */
17
18 double i = 0.5i;
19 double I = 0.5I;
20 double j = 0.5j;
21 double J = 0.5J;
22
23 /* Check that imaginary constant suffixes are allowed with d or D.  */
24
25 double di = 0.5di;
26 double dI = 0.5dI;
27 double Di = 0.5Di;
28 double DI = 0.5DI;
29 double dj = 0.5dj;
30 double dJ = 0.5dJ;
31 double Dj = 0.5Dj;
32 double DJ = 0.5DJ;
33 double id = 0.5id;
34 double iD = 0.5iD;
35 double Id = 0.5Id;
36 double ID = 0.5ID;
37 double jd = 0.5jd;
38 double jD = 0.5jD;
39 double Jd = 0.5Jd;
40 double JD = 0.5JD;