view gcc/testsuite/gcc.dg/pr20054.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 } */
/* { 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;
}