1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-07-02 05:41:43 +02:00
libunwind-eh_elf/tests/Ltest-init-local-signal-lib.c
Yichao Yu 26c99a3a3e Fix init-local-signal test (#50)
* Add `SA_SIGINFO` flag

  This is needed to guarantee the availability of the `ucontext` argument

* Mark the `NULL` pointer load as `volatile`

  Further prevent any compiler optimization on the load.
2017-10-31 08:41:51 -07:00

7 lines
108 B
C

#include <stdio.h>
/* To prevent inlining and optimizing away */
int foo(volatile int* f) {
return *f;
}