summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/fold-reassoc-3.c
blob: 174b35bab1a56758dce58ff39c418a82ac010d32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-fdump-tree-original" } */

int i;
int *p = &i;
static __PTRDIFF_TYPE__ d = p - (p + 1);

void
foo (void)
{
  int *q = &i;
  static __PTRDIFF_TYPE__ e = q - (q + 1);
}

/* { dg-final { scan-tree-dump-not " - " "original" } } */
/* { dg-final { scan-tree-dump-not " \\+ " "original" } } */