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

__SIZE_TYPE__
fx (char *a, __SIZE_TYPE__ sz)
{
  char *b = a + sz;
  /* The first forwprop pass should optimize this to return sz;  */
  return b - a;
}

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