aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-08 15:52:06 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-08 15:52:06 -0800
commit0390d4961c52f09b9528ab89ce5190fc9a470f49 (patch)
treec4473db9480774ed0544d639dfd1c54b8a52d6b4 /tests
parentf689a0eca6f2292478c5d49c1cc3030a5654bbda (diff)
fix testcase for longjmp4 to avoid undefined behavior, enable in all optimization modes; closes #747
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runner.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 723356c0..775225c6 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -2131,8 +2131,6 @@ Exiting setjmp function, level: 0
''')
def test_longjmp4(self):
- if self.emcc_args and '-O' in str(self.emcc_args): return self.skip('this breaks with LLVM optimizations, even natively - is this undefined behavior? see issue 747')
-
src = r'''
#include <setjmp.h>
#include <stdio.h>
@@ -2146,7 +2144,7 @@ Exiting setjmp function, level: 0
void first_func(jmp_state* s) {
jmp_buf* prev_jmp = s->jmp;
jmp_buf c_jmp;
- int once = 0;
+ volatile int once = 0;
if (setjmp(c_jmp) == 0) {
printf("Normal execution path of first function!\n");