blob: 634313708fec568c8246fb5606cfb1c28166af2a (
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
25
|
// RUN: %llvmgcc %s -emit-llvm -g -O0 -c -o %t.bc
// RUN: %klee -check-overshift %t.bc 2> %t.log
// RUN: FileCheck -input-file=%T/klee-last/test000001.overshift.err %s
/* This test checks that the error file isn't empty and contains the
* right content.
*/
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
// FIXME: Need newer FileCheck for to do ``Line: [[@LINE+1]]``
// Just hardcode line number for now
// CHECK-NEXT: Line: 22
result = x << y;
return 0;
}
|