aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr115492.c
blob: 4ecc060768c0ab833c15b003ac845c8a5fe1718f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do run } */

int a = 2, b=0, *c = &a, *d = &a, e=0;
[[gnu::noipa]]
void f(int) {}
[[gnu::noipa]]
int h(int *k) {
  int ***j;
  if (b) {
    *j = &k; // Note the unintialized j is used here
             // but since it is conditional and b is always zero, there should no
             // effect otherwise.
    ***j;
  }
  f(*k);
  *d = e;
  return *k;
}
int main() { if (h(c)) __builtin_abort(); }