aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/pr20054.c
blob: 292b856d014cad30e24ebb36f789a32f2a595265 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

/* { 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;
}