2 /* { dg-options "-fsanitize=float-cast-overflow" } */
19 #define CHECK_BOUNDARY(VAR, VAL) \
20 (VAR) = (VAL) - 1.5; \
21 (VAR) = (VAL) - 1.0; \
22 (VAR) = (VAL) - 0.5; \
23 (VAR) = (VAL) - 0.0000001; \
24 (VAR) = (VAL) - 0.0; \
26 (VAR) = (VAL) + 0.0; \
27 (VAR) = (VAL) + 0.0000001; \
28 (VAR) = (VAL) + 0.5; \
29 (VAR) = (VAL) + 1.0; \
32 /* Signed bit-field. (-1, 0) is valid. */
34 CHECK_BOUNDARY (s
.i
, d
);
36 CHECK_BOUNDARY (s
.i
, d
);
38 CHECK_BOUNDARY (s
.i
, d
);
40 /* Unsigned bit-field. (0, 1) is valid. */
42 CHECK_BOUNDARY (t
.i
, d
);
44 CHECK_BOUNDARY (t
.i
, d
);
46 CHECK_BOUNDARY (t
.i
, d
);
51 /* { dg-output " -2.5 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
52 /* { dg-output "\[^\n\r]* -2 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
53 /* { dg-output "\[^\n\r]* 1 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
54 /* { dg-output "\[^\n\r]* 1.5 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
55 /* { dg-output "\[^\n\r]* 1 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
56 /* { dg-output "\[^\n\r]* 1 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
57 /* { dg-output "\[^\n\r]* 1 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
58 /* { dg-output "\[^\n\r]* 1 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
59 /* { dg-output "\[^\n\r]* 1.5 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
60 /* { dg-output "\[^\n\r]* 2 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
61 /* { dg-output "\[^\n\r]* 2.5 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
62 /* { dg-output "\[^\n\r]* -2.5 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
63 /* { dg-output "\[^\n\r]* -2 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
64 /* { dg-output "\[^\n\r]* -1.5 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
65 /* { dg-output "\[^\n\r]* -1 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
66 /* { dg-output "\[^\n\r]* -1 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
67 /* { dg-output "\[^\n\r]* -1 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
68 /* { dg-output "\[^\n\r]* -1 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
69 /* { dg-output "\[^\n\r]* -1.5 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
70 /* { dg-output "\[^\n\r]* -1 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
71 /* { dg-output "\[^\n\r]* 2 is outside the range of representable values of type\[^\n\r]*(\n|\r\n|\r)" } */
72 /* { dg-output "\[^\n\r]* 2.5 is outside the range of representable values of type" } */