aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/alias-access-path-8.c
blob: 85f2c6a37e46d77a8e33b8734a469e5c6a92e5fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-fre1" } */
struct a {
  int val;
};
struct b {
  struct a a[10],a2[10];
};
struct c {
  struct b b[10];
} *cptr,*cptr2;


int
test (int i, int j, int k, int l)
{
  cptr->b[i].a[j].val=123;
  cptr2->b[k].a2[l].val=2;
  return cptr->b[i].a[j].val;
}
/* { dg-final { scan-tree-dump-times "return 123" 1 "fre1"} } */