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/c-c++-common/dfp/convert-bfp-7.c | 83 ++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 gcc/testsuite/c-c++-common/dfp/convert-bfp-7.c (limited to 'gcc/testsuite/c-c++-common/dfp/convert-bfp-7.c') diff --git a/gcc/testsuite/c-c++-common/dfp/convert-bfp-7.c b/gcc/testsuite/c-c++-common/dfp/convert-bfp-7.c new file mode 100644 index 000000000..f51d696ce --- /dev/null +++ b/gcc/testsuite/c-c++-common/dfp/convert-bfp-7.c @@ -0,0 +1,83 @@ +/* { dg-options "-w" } */ + +/* This test assumes IEEE float and double. */ + +#define __STDC_WANT_DEC_FP__ +#include + +#include "convert.h" + +volatile _Decimal32 sd; +volatile _Decimal64 dd; +volatile _Decimal128 td; +volatile float sf; +volatile double df; + +/* Check values that are too large for the result type. */ +CONVERT_TO_PINF (301, sd, sf, 4.e+38df, f) +CONVERT_TO_PINF (303, dd, sf, 4.e+38dd, f) +CONVERT_TO_PINF (302, sd, sf, 9.9e+384df, f) +CONVERT_TO_PINF (304, dd, sf, 9.9e+384dd, f) +CONVERT_TO_PINF (305, td, sf, 4.e+38dl, f) +CONVERT_TO_PINF (306, td, sf, 1.e+39dl, f) +CONVERT_TO_MINF (311, sd, sf, -4.e+38df, f) +CONVERT_TO_MINF (312, dd, sf, -4.e+38dd, f) +CONVERT_TO_MINF (313, sd, sf, -9.9e+384df, f) +CONVERT_TO_MINF (314, dd, sf, -9.9e+384dd, f) +CONVERT_TO_MINF (315, td, sf, -4.e+38dl, f) +CONVERT_TO_MINF (316, td, sf, -1.e+39dl, f) + +CONVERT_TO_PINF (321, dd, df, 1.8e+308dd,) +CONVERT_TO_PINF (322, dd, df, 9.9e+384dd,) +CONVERT_TO_PINF (323, td, df, 1.8e+308dl,) +CONVERT_TO_PINF (324, td, df, 9.9e+384dl,) +CONVERT_TO_PINF (325, dd, df, 1.e309dd,) +CONVERT_TO_PINF (326, td, df, 1.e309dl,) +CONVERT_TO_MINF (331, dd, df, -1.8e+308dd,) +CONVERT_TO_MINF (332, dd, df, -9.9e+384dd,) +CONVERT_TO_MINF (333, td, df, -1.8e+308dl,) +CONVERT_TO_MINF (334, td, df, -9.9e+384dl,) +CONVERT_TO_MINF (335, dd, df, -1.e309dd,) +CONVERT_TO_MINF (336, td, df, -1.e309dl,) + +CONVERT_TO_PINF (341, df, sd, 1.0e+97, d32) +CONVERT_TO_PINF (342, df, sd, 1.6e+308, d32) +CONVERT_TO_MINF (351, df, sd, -1.0e+97, d32) +CONVERT_TO_MINF (352, df, sd, -1.6e+308, d32) + +int +main () +{ + convert_301 (); + convert_302 (); + convert_303 (); + convert_304 (); + convert_305 (); + convert_306 (); + convert_311 (); + convert_312 (); + convert_313 (); + convert_314 (); + convert_315 (); + convert_316 (); + + convert_321 (); + convert_322 (); + convert_323 (); + convert_324 (); + convert_325 (); + convert_326 (); + convert_331 (); + convert_332 (); + convert_333 (); + convert_334 (); + convert_335 (); + convert_336 (); + + convert_341 (); + convert_342 (); + convert_351 (); + convert_352 (); + + FINISH +} -- cgit v1.2.3