Implement C _FloatN, _FloatNx types.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / float32x-floath.c
blob49e7ba4ed3aa06960601a9e525a88a042584274a
1 /* Test _Float32x <float.h> macros. */
2 /* { dg-do run } */
3 /* { dg-options "" } */
4 /* { dg-add-options float32x } */
5 /* { dg-require-effective-target float32x_runtime } */
7 #define WIDTH 32
8 #define EXT 1
9 #include "floatn-floath.h"
11 #ifndef FLT32X_MANT_DIG
12 # error "FLT32X_MANT_DIG undefined"
13 #endif
15 #ifndef FLT32X_DECIMAL_DIG
16 # error "FLT32X_DECIMAL_DIG undefined"
17 #endif
19 #ifndef FLT32X_DIG
20 # error "FLT32X_DIG undefined"
21 #endif
23 #ifndef FLT32X_MIN_EXP
24 # error "FLT32X_MIN_EXP undefined"
25 #endif
27 #ifndef FLT32X_MIN_10_EXP
28 # error "FLT32X_MIN_10_EXP undefined"
29 #endif
31 #ifndef FLT32X_MAX_EXP
32 # error "FLT32X_MAX_EXP undefined"
33 #endif
35 #ifndef FLT32X_MAX_10_EXP
36 # error "FLT32X_MAX_10_EXP undefined"
37 #endif
39 #ifndef FLT32X_MAX
40 # error "FLT32X_MAX undefined"
41 #endif
43 #ifndef FLT32X_EPSILON
44 # error "FLT32X_EPSILON undefined"
45 #endif
47 #ifndef FLT32X_MIN
48 # error "FLT32X_MIN undefined"
49 #endif
51 #ifndef FLT32X_TRUE_MIN
52 # error "FLT32X_TRUE_MIN undefined"
53 #endif
55 #if FLT32X_DECIMAL_DIG > DECIMAL_DIG
56 # error "FLT32X_DECIMAL_DIG > DECIMAL_DIG"
57 #endif
59 #if FLT32X_MANT_DIG < 32 || FLT32X_MAX_EXP < 1024 || FLT32X_MIN_EXP + FLT32X_MAX_EXP != 3
60 # error "_Float32x bad format"
61 #endif