aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEli Bendersky <eliben@chromium.org>2013-05-20 13:56:49 -0700
committerEli Bendersky <eliben@chromium.org>2013-05-20 13:56:49 -0700
commitdf0f355cb3e96368db367b9edb9bb851cffacbcc (patch)
tree3ea60a8aef29b4d590741a039f512b503f50674e /test
parent6aea8b4a69a0e6c9c8907a94298efb40c8cd9e87 (diff)
Fix stderr redirection in test to work on all platforms
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3429 R=mseaborn@chromium.org Review URL: https://codereview.chromium.org/15470008
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/NaCl/rewrite-setjmp-store-error.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/NaCl/rewrite-setjmp-store-error.ll b/test/Transforms/NaCl/rewrite-setjmp-store-error.ll
new file mode 100644
index 0000000000..1c3dd0d4cb
--- /dev/null
+++ b/test/Transforms/NaCl/rewrite-setjmp-store-error.ll
@@ -0,0 +1,13 @@
+; RUN: opt < %s -rewrite-pnacl-library-calls -S 2>&1 | FileCheck %s
+; Test that the pass enforces not being able to store the address
+; of setjmp.
+
+declare i32 @setjmp(i64*)
+
+define i32 @takeaddr_setjmp(i64* %arg) {
+ %fp = alloca i32 (i64*)*, align 8
+; CHECK: Taking the address of setjmp is invalid
+ store i32 (i64*)* @setjmp, i32 (i64*)** %fp, align 8
+ ret i32 7
+}
+