summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/float16-floath.c
blob: 6857c2e9aa87d4e369eac37e24c917db5416c91d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* Test _Float16 <float.h> macros.  */
/* { dg-do run } */
/* { dg-options "" } */
/* { dg-add-options float16 } */
/* { dg-require-effective-target float16_runtime } */

#define WIDTH 16
#define EXT 0
#include "floatn-floath.h"

#ifndef FLT16_MANT_DIG
# error "FLT16_MANT_DIG undefined"
#endif

#ifndef FLT16_DECIMAL_DIG
# error "FLT16_DECIMAL_DIG undefined"
#endif

#ifndef FLT16_DIG
# error "FLT16_DIG undefined"
#endif

#ifndef FLT16_MIN_EXP
# error "FLT16_MIN_EXP undefined"
#endif

#ifndef FLT16_MIN_10_EXP
# error "FLT16_MIN_10_EXP undefined"
#endif

#ifndef FLT16_MAX_EXP
# error "FLT16_MAX_EXP undefined"
#endif

#ifndef FLT16_MAX_10_EXP
# error "FLT16_MAX_10_EXP undefined"
#endif

#ifndef FLT16_MAX
# error "FLT16_MAX undefined"
#endif

#ifndef FLT16_EPSILON
# error "FLT16_EPSILON undefined"
#endif

#ifndef FLT16_MIN
# error "FLT16_MIN undefined"
#endif

#ifndef FLT16_TRUE_MIN
# error "FLT16_TRUE_MIN undefined"
#endif

#if FLT16_DECIMAL_DIG > DECIMAL_DIG
# error "FLT16_DECIMAL_DIG > DECIMAL_DIG"
#endif

#if FLT16_MANT_DIG != 11 || FLT16_MAX_EXP != 16 || FLT16_MIN_EXP != -13
# error "_Float16 bad format"
#endif