c++: constantness of call to function pointer [PR111703]
[official-gcc.git] / gcc / testsuite / g++.dg / pr107803.C
blobf814e968b69bb6bab832ca00cf0bce78d8956220
1 // { dg-do compile }
2 // { dg-options "-O -fno-tree-dominator-opts -fno-tree-fre -Wmaybe-uninitialized" }
4 void printf(...);
5 void __sigsetjmp_cancel() __attribute__((__returns_twice__));
6 int z, main_ret;
7 void func(void *) {}
9 int
10 main()
12   int x;
13   void (*__cancel_routine)(void *)(func);
14   __sigsetjmp_cancel();
15   __cancel_routine(0);
16   if (main_ret)
17     x = z;
18   printf(x);