Skip to content

Commit df0f355

Browse files
committed
1 parent 6aea8b4 commit df0f355

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
; RUN: opt < %s -rewrite-pnacl-library-calls -S 2>&1 | FileCheck %s
2+
; Test that the pass enforces not being able to store the address
3+
; of setjmp.
4+
5+
declare i32 @setjmp(i64*)
6+
7+
define i32 @takeaddr_setjmp(i64* %arg) {
8+
%fp = alloca i32 (i64*)*, align 8
9+
; CHECK: Taking the address of setjmp is invalid
10+
store i32 (i64*)* @setjmp, i32 (i64*)** %fp, align 8
11+
ret i32 7
12+
}
13+

0 commit comments

Comments
 (0)