blob: 058aef7ec1d0db23e2101f3e23c953643b19a83d (
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: %clang %s -emit-llvm -g %O0opt -c -o %t.bc
// RUN: rm -rf %t.klee-out
// RUN: %klee --output-dir=%t.klee-out -check-overshift %t.bc 2> %t.log
// RUN: FileCheck -input-file=%t.klee-out/test000001.overshift.err %s
/* This test checks that the error file isn't empty and contains the
* right content.
*/
#include "klee/klee.h"
int main() {
unsigned int x = 15;
unsigned int y;
unsigned int z;
volatile unsigned int result;
/* Overshift if y>= sizeof(x) */
klee_make_symbolic(&y, sizeof(y), "shift_amount1");
// CHECK: Error: overshift error
// CHECK-NEXT: 2014-07-04-unflushed-error-report.c
// CHECK-NEXT: Line: [[@LINE+1]]
result = x << y;
return 0;
}
|