Add _FloatN, _FloatNx tests for __builtin_fpclassify.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / float128x-floath.c
blob3ac96ce3177fd68bbc3dfcba03ec7e1c19a480b8
1 /* Test _Float128x <float.h> macros. */
2 /* { dg-do run } */
3 /* { dg-options "" } */
4 /* { dg-add-options float128x } */
5 /* { dg-add-options ieee } */
6 /* { dg-require-effective-target float128x_runtime } */
8 #define WIDTH 128
9 #define EXT 1
10 #include "floatn-floath.h"
12 #ifndef FLT128X_MANT_DIG
13 # error "FLT128X_MANT_DIG undefined"
14 #endif
16 #ifndef FLT128X_DECIMAL_DIG
17 # error "FLT128X_DECIMAL_DIG undefined"
18 #endif
20 #ifndef FLT128X_DIG
21 # error "FLT128X_DIG undefined"
22 #endif
24 #ifndef FLT128X_MIN_EXP
25 # error "FLT128X_MIN_EXP undefined"
26 #endif
28 #ifndef FLT128X_MIN_10_EXP
29 # error "FLT128X_MIN_10_EXP undefined"
30 #endif
32 #ifndef FLT128X_MAX_EXP
33 # error "FLT128X_MAX_EXP undefined"
34 #endif
36 #ifndef FLT128X_MAX_10_EXP
37 # error "FLT128X_MAX_10_EXP undefined"
38 #endif
40 #ifndef FLT128X_MAX
41 # error "FLT128X_MAX undefined"
42 #endif
44 #ifndef FLT128X_EPSILON
45 # error "FLT128X_EPSILON undefined"
46 #endif
48 #ifndef FLT128X_MIN
49 # error "FLT128X_MIN undefined"
50 #endif
52 #ifndef FLT128X_TRUE_MIN
53 # error "FLT128X_TRUE_MIN undefined"
54 #endif
56 #if FLT128X_DECIMAL_DIG > DECIMAL_DIG
57 # error "FLT128X_DECIMAL_DIG > DECIMAL_DIG"
58 #endif
60 #if FLT128X_MANT_DIG < 128 || FLT128X_MAX_EXP < 65536 || FLT128X_MIN_EXP + FLT128X_MAX_EXP != 3
61 # error "_Float128x bad format"
62 #endif