view gcc/testsuite/gcc.dg/pr20054.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
line wrap: on
line source


/* { dg-do compile } */
/* { dg-options "-O2 -fno-strict-aliasing" } */


unsigned int *foo (void);

char *
bar (double *d)
{
  return (char *) (d + 1) - sizeof (unsigned int);
}

char
baz (double x)
{
  unsigned int h = *foo ();
  unsigned int l = *(unsigned int *) bar (&x);

  return (h & ~0x80000000L) == 0x7FF00000 && l == 0;
}