about summary refs log tree commit diff homepage
path: root/test/regression/2008-05-23-gep-with-global-const.c
blob: 6bd78dd29131548592524a3e618638612405f792 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %llvmgcc -emit-llvm -O0 -c -o %t.bc %s
// RUN: rm -rf %t.klee-out
// RUN: %klee --output-dir=%t.klee-out --exit-on-error %t.bc

#include <assert.h>

int a;

int main() {
  void *p1 = &((char*) 0)[(long) &a];
  void *p2 = &a;

  assert(p1 == p2);

  return 0;
}