aboutsummaryrefslogtreecommitdiffstats
path: root/test/regression/ptrs3.c
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-07-06 12:51:42 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-07-06 12:51:42 +0200
commite30aa60a06817ed67c14a80430a7275defc41e76 (patch)
treeb4bb512416a40578db1f32eb3a7836ddb6f8582d /test/regression/ptrs3.c
parentaa780c7145a418b4a7264e828258034fc4629313 (diff)
parent2f31c1867b75040067a1ef74ae32f197e8d296c1 (diff)
downloadcompcert-e30aa60a06817ed67c14a80430a7275defc41e76.tar.gz
compcert-e30aa60a06817ed67c14a80430a7275defc41e76.zip
Merge branch 'master' into json_export
Conflicts: driver/Driver.ml
Diffstat (limited to 'test/regression/ptrs3.c')
-rw-r--r--test/regression/ptrs3.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/regression/ptrs3.c b/test/regression/ptrs3.c
new file mode 100644
index 00000000..e0425af4
--- /dev/null
+++ b/test/regression/ptrs3.c
@@ -0,0 +1,10 @@
+#include <stdio.h>
+
+int main() {
+ int a[10];
+ int *p = &a[0];
+ int *q = &a[9];
+ printf("p - q = %d\n", (int)(p - q));
+ printf("q - p = %d\n", (int)(q - p));
+ return 0;
+}