aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/dfp/convert-bfp-12.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/dfp/convert-bfp-12.c')
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/dfp/convert-bfp-12.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/dfp/convert-bfp-12.c b/gcc-4.9/gcc/testsuite/c-c++-common/dfp/convert-bfp-12.c
new file mode 100644
index 000000000..7a909552a
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/dfp/convert-bfp-12.c
@@ -0,0 +1,16 @@
+/* Test for bug where fold wrongly removed conversions to double and
+ replaced them by conversions to float. */
+
+#include "dfp-dbg.h"
+
+volatile float f = __builtin_inff ();
+volatile _Decimal32 d32 = 1e40DF;
+
+int
+main (void)
+{
+ if ((double) f == (double) d32)
+ FAILURE
+
+ FINISH
+}