aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr108354-1.c
blob: 60d1dbc281ece3bd8bea9618c767325333a85392 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* { dg-options "-O2 -fdump-tree-optimized" } */

int b;
int *c;
int e;
static int *f = &e;
int g;
void foo();
short(a)(short h, short i) { return h - i; }
int(d)(int h) { return h == 83647 ? 0 : -h; }
int main() {
  short j;
  int *k = &e, *l = &b;
  *f = 0 == c;
  j = a(0 != 2, *k);
  if (d(j ^ (0 == l || *k)) != *k)
    ;
  else
    foo();
  c = &g;
}

/* { dg-final { scan-tree-dump-times " 1 - " 0 "optimized" } } */
/* There should be no calls to foo. */
/* { dg-final { scan-tree-dump-times "foo " 0 "optimized" } } */