aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authormax99x <max99x@gmail.com>2011-08-23 06:10:22 +0300
committermax99x <max99x@gmail.com>2011-08-23 06:10:22 +0300
commit0e2cbf14971ff4145c62e61e118fc6095a658a3a (patch)
treefbe25c6b5f49a5d283add4f085367b950820259b /tests
parent536bad16ce88bad71fe94af285f9a9d2f721b2ad (diff)
parentaf67804695835d1ce1e084614a886366768b2015 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'tests')
-rw-r--r--tests/cases/ptrtoint_blockaddr.ll20
-rw-r--r--tests/runner.py14
2 files changed, 29 insertions, 5 deletions
diff --git a/tests/cases/ptrtoint_blockaddr.ll b/tests/cases/ptrtoint_blockaddr.ll
new file mode 100644
index 00000000..11e2f7bc
--- /dev/null
+++ b/tests/cases/ptrtoint_blockaddr.ll
@@ -0,0 +1,20 @@
+@.str = private constant [15 x i8] c"hello, world!\0A\00", align 1 ; [#uses=1]
+
+define linkonce_odr i32* @main() align 2 {
+ %199 = trunc i8 1 to i1 ; [#uses=1]
+ br i1 %199, label %555, label %569
+
+; <label>:555 ; preds = %353
+ br label %569
+ ; No predecessors!
+ br label %569
+
+; <label>:569 ; preds = %555
+ %333 = call i32 @printf(i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0)) ; [#uses=0]
+ ; this should compile ok
+ store i32 ptrtoint (i8* blockaddress(@main, %569) to i32), i8* getelementptr inbounds ([15 x i8]* @.str, i32 0, i32 0), align 8
+ ret i32 0
+}
+
+declare i32 @printf(i8*)
+
diff --git a/tests/runner.py b/tests/runner.py
index ec47416f..e866649d 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -3746,8 +3746,11 @@ else:
USE_CLOSURE_COMPILER = 1
if USE_CLOSURE_COMPILER:
- index = SPIDERMONKEY_ENGINE.index("options('strict')")
- SPIDERMONKEY_ENGINE = SPIDERMONKEY_ENGINE[:index-1] + SPIDERMONKEY_ENGINE[index+1:] # closure generates non-strict
+ try:
+ index = SPIDERMONKEY_ENGINE.index("options('strict')")
+ SPIDERMONKEY_ENGINE = SPIDERMONKEY_ENGINE[:index-1] + SPIDERMONKEY_ENGINE[index+1:] # closure generates non-strict
+ except:
+ pass
COMPILER = CLANG
JS_ENGINE = SPIDERMONKEY_ENGINE
@@ -3758,12 +3761,13 @@ else:
QUANTUM_SIZE = 1
RELOOP = OPTIMIZE = 1
USE_TYPED_ARRAYS = 0
- ASSERTIONS = SAFE_HEAP = CHECK_OVERFLOWS = CORRECT_OVERFLOWS = CHECK_SIGNS = INIT_STACK = AUTO_OPTIMIZE = RUNTIME_TYPE_INFO = DISABLE_EXCEPTIONS = 0
+ ASSERTIONS = SAFE_HEAP = CHECK_OVERFLOWS = CORRECT_OVERFLOWS = CHECK_SIGNS = INIT_STACK = AUTO_OPTIMIZE = RUNTIME_TYPE_INFO = 0
INVOKE_RUN = 1
CORRECT_SIGNS = 0
CORRECT_ROUNDINGS = 0
CORRECT_OVERFLOWS_LINES = CORRECT_SIGNS_LINES = CORRECT_ROUNDINGS_LINES = SAFE_HEAP_LINES = []
LLVM_OPTS = 1
+ DISABLE_EXCEPTIONS = 1
TEST_REPS = 4
TOTAL_TESTS = 6
@@ -3804,8 +3808,8 @@ else:
os.remove(filename + '.cc.js')
except:
pass
- # Something like this:
- # java -jar CLOSURE_COMPILER --compilation_level ADVANCED_OPTIMIZATIONS --variable_map_output_file src.cpp.o.js.vars --js src.cpp.o.js --js_output_file src.cpp.o.cc.js
+ # Something like this (adjust memory as needed):
+ # java -Xmx1024m -jar CLOSURE_COMPILER --compilation_level ADVANCED_OPTIMIZATIONS --variable_map_output_file src.cpp.o.js.vars --js src.cpp.o.js --js_output_file src.cpp.o.cc.js
cc_output = Popen(['java', '-jar', CLOSURE_COMPILER,
'--compilation_level', 'ADVANCED_OPTIMIZATIONS',