aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-38.c
blob: 2b342db524734d60f68e091627de7826e0064962 (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 "-O -fdump-tree-fre1" } */

struct S { int i; int j; };

struct U
{
  struct S a[10];
} u;

int foo (int n, int i, int j)
{
  u.a[n].i = i;
  u.a[n].j = j;
  return u.a[n].i;
}

/* We should remove the redundant load.  */

/* { dg-final { scan-tree-dump-not "= u.a\\\[n_2\\(D\\)\\\].i" "fre1" } } */
/* { dg-final { cleanup-tree-dump "fre1" } } */