summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr13146.c
blob: b556457678ccdda2efdd1c30a068c5bbd86711e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-do compile } */
/* { dg-options "-O -fstrict-aliasing -fdump-tree-optimized" } */

struct A
{
  int i;
};
struct B
{
  struct A a;
  int j;
};

int foo (struct A *p, struct B *q)
{
  p->i = 0;
  q->j = 1;
  return p->i;
}

/* { dg-final { scan-tree-dump "return 0;" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */