aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/struct-aliasing-1.c
blob: 495b7ba114e46ea6b6e84d8e7b381fadee9c060a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-fre1-details" } */

struct S { float f; };
int __attribute__((noinline))
foo (float *r, struct S *p)
{
  int *q = (int *)&p->f;
  int i = *q;
  *r = 0.0;
  return i + *q;
}

/* { dg-final { scan-tree-dump "Replaced\[^\n\]*with i_." "fre1" } } */
/* { dg-final { cleanup-tree-dump "fre1" } } */