about summary refs log tree commit diff homepage
path: root/test/regression/2007-08-06-64bit-shift.c
blob: 675211fd59c83485ba5a8c729f250969aa06740e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// RUN: %clang %s -emit-llvm %O0opt -c -o %t1.bc
// RUN: rm -rf %t.klee-out
// RUN: %klee --output-dir=%t.klee-out %t1.bc

#include "klee/klee.h"
#include <assert.h>

int main() {
  int d;
  
  klee_make_symbolic(&d, sizeof(d), "d");

  int l = d - 1;
  unsigned long long m = ((unsigned long long) l << 32) / d;
  if (d==2) {
    assert(m == 2147483648u);
  }

  klee_silent_exit(0);

  return 0;
}