summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr58742-3.c
blob: 3c4d14596cea0c02b72a1cc30bc600cd151a5a45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-cddce1" } */

int *
fx (int *a, int sz)
{
  int *b = a + sz;
  b = b - sz;
  /* forwprop together with FRE should optimize this to return a;  */
  return b;
}

/* { dg-final { scan-tree-dump "return a" "cddce1" } } */