From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/gcc.dg/dfp/decfloat-constants.c | 47 +++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/dfp/decfloat-constants.c (limited to 'gcc/testsuite/gcc.dg/dfp/decfloat-constants.c') diff --git a/gcc/testsuite/gcc.dg/dfp/decfloat-constants.c b/gcc/testsuite/gcc.dg/dfp/decfloat-constants.c new file mode 100644 index 000000000..c72933f42 --- /dev/null +++ b/gcc/testsuite/gcc.dg/dfp/decfloat-constants.c @@ -0,0 +1,47 @@ +/* N1150 4: Characteristics of decimal floating types . + C99 5.2.4.2.2a[3]: New. + + Verify constants about range of decimal float and three components of + decimal float defined in float.h. */ + +/* Make sure we are exporting the right values to float.h. */ +#ifndef __STDC_WANT_DEC_FP__ +#define __STDC_WANT_DEC_FP__ 1 +#endif + +#include "dfp-dbg.h" +#include + +int main () +{ + if (DEC32_MANT_DIG != 7) FAILURE + if (DEC64_MANT_DIG != 16) FAILURE + if (DEC128_MANT_DIG != 34) FAILURE + + if (DEC32_MIN_EXP != -94) FAILURE + if (DEC64_MIN_EXP != -382) FAILURE + if (DEC128_MIN_EXP != -6142) FAILURE + + if (DEC32_MAX_EXP != 97) FAILURE + if (DEC64_MAX_EXP != 385) FAILURE + if (DEC128_MAX_EXP != 6145) FAILURE + + if (DEC32_MAX != 9.999999E96DF) FAILURE + if (DEC64_MAX != 9.999999999999999E384DD) FAILURE + if (DEC128_MAX != 9.999999999999999999999999999999999E6144DL) FAILURE + + if (DEC32_EPSILON != 1E-6DF) FAILURE + if (DEC64_EPSILON != 1E-15DD) FAILURE + if (DEC128_EPSILON != 1E-33DL) FAILURE + + if (DEC32_MIN != 1E-95DF) FAILURE + if (DEC64_MIN != 1E-383DD) FAILURE + if (DEC128_MIN != 1E-6143DL) FAILURE + + if (DEC32_SUBNORMAL_MIN != 0.000001E-95DF) FAILURE + if (DEC64_SUBNORMAL_MIN != 0.000000000000001E-383DD) FAILURE + if (DEC128_SUBNORMAL_MIN != 0.000000000000000000000000000000001E-6143DL) + FAILURE + + FINISH +} -- cgit v1.2.3