OSDN Git Service

PR middle-end/36578
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / dfp / convert-dfp-fold-2.c
1 /* Test for bug where fold narrowed decimal floating-point
2    operations.  */
3 /* { dg-options "-std=gnu99" } */
4
5 extern void abort (void);
6 extern void exit (int);
7
8 volatile _Decimal32 f = 1.23456DF;
9 volatile _Decimal64 d = 1.23456DD;
10
11 int
12 main (void)
13 {
14   if ((_Decimal128)((_Decimal64)f * (_Decimal64)f) != (_Decimal128)(d * d))
15     abort ();
16   exit (0);
17 }