aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/dfp/bid-non-canonical-d64-1.c
blob: 4602d34d7cb5f9cfe72a8c6e70b6714be49411db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* Test non-canonical BID significands: _Decimal64.  Bug 91226.  */
/* { dg-do run } */
/* { dg-require-effective-target dfp_bid } */
/* { dg-options "-std=gnu2x -O2" } */

extern void abort (void);
extern void exit (int);

union u
{
  _Decimal64 d64;
  unsigned long long int u64;
};

int
main (void)
{
  union u x;
  _Decimal64 d64;
  x.u64 = 0x6c7386f26fc10001ULL;
  d64 = x.d64;
  volatile double d = d64;
  if (d == 0)
    exit (0);
  else
    abort ();
}