aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/dfp/pr31344.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/dfp/pr31344.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/dfp/pr31344.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/dfp/pr31344.c b/gcc-4.9/gcc/testsuite/gcc.dg/dfp/pr31344.c
new file mode 100644
index 000000000..506eef450
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/dfp/pr31344.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O -mtune=i386" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
+/* { dg-options "-O" } */
+
+typedef struct
+{
+ unsigned char bits;
+} decNumber;
+
+typedef struct
+{
+ unsigned char bytes[1];
+} decimal32;
+
+extern decNumber *__decimal32ToNumber (const decimal32 *, decNumber *);
+extern void __host_to_ieee_32 (_Decimal32, decimal32 *);
+
+void
+foo (_Decimal32 arg)
+{
+ decNumber dn;
+ decimal32 d32;
+ __host_to_ieee_32 (arg, &d32);
+ __decimal32ToNumber (&d32, &dn);
+}