OSDN Git Service

2012-01-30 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / dfp / pr31344.c
1 /* { dg-do compile } */
2 /* { dg-options "-O -mtune=i386" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
3 /* { dg-options "-O" } */
4
5 typedef struct
6 {
7   unsigned char bits;
8 } decNumber;
9
10 typedef struct
11 {
12   unsigned char bytes[1];
13 } decimal32;
14
15 extern decNumber *__decimal32ToNumber (const decimal32 *, decNumber *);
16 extern void __host_to_ieee_32 (_Decimal32, decimal32 *);
17
18 void
19 foo (_Decimal32 arg)
20 {
21   decNumber dn;
22   decimal32 d32;
23   __host_to_ieee_32 (arg, &d32);
24   __decimal32ToNumber (&d32, &dn);
25 }