aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/dfp/convert-bfp-13.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/dfp/convert-bfp-13.c')
-rw-r--r--gcc/testsuite/gcc.dg/dfp/convert-bfp-13.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/dfp/convert-bfp-13.c b/gcc/testsuite/gcc.dg/dfp/convert-bfp-13.c
new file mode 100644
index 0000000..91a5b49
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/dfp/convert-bfp-13.c
@@ -0,0 +1,20 @@
+/* Test for bug where fold changed binary operation to decimal
+ depending on typedefs. */
+/* { dg-options "-std=gnu99" } */
+
+extern void abort (void);
+extern void exit (int);
+
+volatile double d = 1.2345675;
+
+typedef const volatile _Decimal32 d32;
+
+int
+main (void)
+{
+ _Decimal32 a = (d * d);
+ d32 b = (d * d);
+ if (a != b)
+ abort ();
+ exit (0);
+}