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

int a[256];
int *b, *c;
void foo (int i, int j)
{
  b = &a[i+j];
  c = &a[i+j];
}

/* We should remove the redundant address computation.  */

/* { dg-final { scan-tree-dump-times " = &a" 1 "fre1" } } */
/* { dg-final { cleanup-tree-dump "fre1" } } */