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

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-times "\\\*q" 1 "fre" } } */
/* { dg-final { cleanup-tree-dump "fre" } } */