diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-07-06 12:51:42 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2015-07-06 12:51:42 +0200 |
commit | e30aa60a06817ed67c14a80430a7275defc41e76 (patch) | |
tree | b4bb512416a40578db1f32eb3a7836ddb6f8582d /test | |
parent | aa780c7145a418b4a7264e828258034fc4629313 (diff) | |
parent | 2f31c1867b75040067a1ef74ae32f197e8d296c1 (diff) | |
download | compcert-e30aa60a06817ed67c14a80430a7275defc41e76.tar.gz compcert-e30aa60a06817ed67c14a80430a7275defc41e76.zip |
Merge branch 'master' into json_export
Conflicts:
driver/Driver.ml
Diffstat (limited to 'test')
-rw-r--r--[-rwxr-xr-x] | test/compression/arcode.c | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | test/compression/arcode.h | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | test/compression/armain.c | 0 | ||||
-rw-r--r-- | test/regression/Makefile | 2 | ||||
-rw-r--r-- | test/regression/Results/ptrs3 | 2 | ||||
-rw-r--r-- | test/regression/ptrs3.c | 10 |
6 files changed, 13 insertions, 1 deletions
diff --git a/test/compression/arcode.c b/test/compression/arcode.c index f915cc25..f915cc25 100755..100644 --- a/test/compression/arcode.c +++ b/test/compression/arcode.c diff --git a/test/compression/arcode.h b/test/compression/arcode.h index aac32080..aac32080 100755..100644 --- a/test/compression/arcode.h +++ b/test/compression/arcode.h diff --git a/test/compression/armain.c b/test/compression/armain.c index 8f37c4ff..8f37c4ff 100755..100644 --- a/test/compression/armain.c +++ b/test/compression/armain.c diff --git a/test/regression/Makefile b/test/regression/Makefile index 94c212d2..da7d5755 100644 --- a/test/regression/Makefile +++ b/test/regression/Makefile @@ -17,7 +17,7 @@ TESTS=int32 int64 floats floats-basics \ volatile1 volatile2 volatile3 \ funct3 expr5 struct7 struct8 struct11 casts1 casts2 char1 \ sizeof1 sizeof2 binops bool for1 switch switch2 compound \ - decl1 interop1 bitfields9 + decl1 interop1 bitfields9 ptrs3 # Can run, but only in compiled mode, and have reference output in Results diff --git a/test/regression/Results/ptrs3 b/test/regression/Results/ptrs3 new file mode 100644 index 00000000..17af0459 --- /dev/null +++ b/test/regression/Results/ptrs3 @@ -0,0 +1,2 @@ +p - q = -9 +q - p = 9 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; +} |