about summary refs log tree commit diff homepage
path: root/test/regression/2008-05-23-gep-with-global-const.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/regression/2008-05-23-gep-with-global-const.c')
-rw-r--r--test/regression/2008-05-23-gep-with-global-const.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/regression/2008-05-23-gep-with-global-const.c b/test/regression/2008-05-23-gep-with-global-const.c
new file mode 100644
index 00000000..5e03ec1d
--- /dev/null
+++ b/test/regression/2008-05-23-gep-with-global-const.c
@@ -0,0 +1,15 @@
+// RUN: %llvmgcc -O0 -c -o %t.bc %s
+// RUN: %klee --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;
+}