blob: d8b2cec094b9ea817bca082919eb8d3e5c99c657 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
; RUN: rm -rf %t.klee-out
; RUN: llvm-as -f %s -o - | %klee --output-dir=%t.klee-out
; RUN: not test -f %t.klee-out/test0001.abort.err
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
declare void @klee_abort()
define i32 @foo(i8 signext %val) {
%tmp = zext i8 %val to i32
ret i32 %tmp
}
define i32 @main() {
%res = call i32 bitcast (i32 (i8)* @foo to i32 (i1)*)( i1 1 )
%check = icmp ne i32 %res, 255
br i1 %check, label %error, label %exit
error:
call void @klee_abort()
unreachable
exit:
ret i32 0
}
|