aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/pr107803.C
blob: f814e968b69bb6bab832ca00cf0bce78d8956220 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do compile }
// { dg-options "-O -fno-tree-dominator-opts -fno-tree-fre -Wmaybe-uninitialized" }

void printf(...);
void __sigsetjmp_cancel() __attribute__((__returns_twice__));
int z, main_ret;
void func(void *) {}

int
main()
{
  int x;
  void (*__cancel_routine)(void *)(func);
  __sigsetjmp_cancel();
  __cancel_routine(0);
  if (main_ret)
    x = z;
  printf(x);
}