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