view gcc/testsuite/gcc.dg/torture/20160404-1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* { dg-do compile } */

typedef __UINT64_TYPE__ UINT64;
typedef union {
    struct {
	unsigned short lo4;
	unsigned short lo3;
	unsigned short lo2;
	unsigned short lo1;
    } i;
    long double f;
} BID_BINARY80LDOUBLE;
UINT64 __binary80_to_bid32 (long double x)
{
  BID_BINARY80LDOUBLE x_in;
  x_in.f = x;
  return (x_in.i.lo4
	  + ((UINT64)x_in.i.lo3 << 16)
	  + ((UINT64)x_in.i.lo2 << 32)
	  + ((UINT64)x_in.i.lo1 << 48));
}