1 /* { dg-do compile } */
2 /* { dg-options "-std=gnu99" } */
4 /* N1169 6.4.4 - Constants.
6 Check if the constant 1 is ok. */
8 short _Fract sf
= 1.0hr
;
10 long _Fract lf
= 1.0lr
;
11 long long _Fract llf
= 1.0llr
;
13 unsigned short _Fract usf
= 1.0uhr
;
14 unsigned _Fract uf
= 1.0ur
;
15 unsigned long _Fract ulf
= 1.0ulr
;
16 unsigned long long _Fract ullf
= 1.0ullr
;
18 short _Fract sfF
= 1.0; /* { dg-warning "overflow" } */
19 _Fract fF
= 1.0; /* { dg-warning "overflow" } */
20 long _Fract lfF
= 1.0; /* { dg-warning "overflow" } */
21 long long _Fract llfF
= 1.0; /* { dg-warning "overflow" } */
23 unsigned short _Fract usfF
= 1.0; /* { dg-warning "overflow" } */
24 unsigned _Fract ufF
= 1.0; /* { dg-warning "overflow" } */
25 unsigned long _Fract ulfF
= 1.0; /* { dg-warning "overflow" } */
26 unsigned long long _Fract ullfF
= 1.0; /* { dg-warning "overflow" } */
28 short _Fract sfI
= 1; /* { dg-warning "overflow" } */
29 _Fract fI
= 1; /* { dg-warning "overflow" } */
30 long _Fract lfI
= 1; /* { dg-warning "overflow" } */
31 long long _Fract llfI
= 1; /* { dg-warning "overflow" } */
33 unsigned short _Fract usfI
= 1; /* { dg-warning "overflow" } */
34 unsigned _Fract ufI
= 1; /* { dg-warning "overflow" } */
35 unsigned long _Fract ulfI
= 1; /* { dg-warning "overflow" } */
36 unsigned long long _Fract ullfI
= 1; /* { dg-warning "overflow" } */