aboutsummaryrefslogtreecommitdiffstats
path: root/test/regression
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-09-20 15:37:57 +0200
committerCyril SIX <cyril.six@kalray.eu>2019-09-20 15:37:57 +0200
commita363d6b93df8fbde24c945551cfea5d845b57fc4 (patch)
tree623126bcba1f5dc500371c77740bec6f1ce9887c /test/regression
parent50e5009c5a3a2f7515bab08a3e9475e10c5f275d (diff)
downloadcompcert-kvx-a363d6b93df8fbde24c945551cfea5d845b57fc4.tar.gz
compcert-kvx-a363d6b93df8fbde24c945551cfea5d845b57fc4.zip
More work on test, regression/packedstruct1.c and regression/varargs2.c don't pass
Diffstat (limited to 'test/regression')
-rw-r--r--test/regression/Makefile10
-rw-r--r--test/regression/extasm.c3
-rw-r--r--test/regression/packedstruct1.c38
3 files changed, 28 insertions, 23 deletions
diff --git a/test/regression/Makefile b/test/regression/Makefile
index c77aa073..57547694 100644
--- a/test/regression/Makefile
+++ b/test/regression/Makefile
@@ -9,8 +9,7 @@ LIBS=$(LIBMATH)
# Can run, both in compiled mode and in interpreter mode,
# and have reference output in Results
-
-TESTS=int32 int64 floats floats-basics \
+TESTS?=int32 int64 floats floats-basics \
expr1 expr6 funptr2 initializers initializers2 initializers3 \
volatile1 volatile2 volatile3 volatile4 \
funct3 expr5 struct7 struct8 struct11 struct12 casts1 casts2 char1 \
@@ -20,12 +19,17 @@ TESTS=int32 int64 floats floats-basics \
# Can run, but only in compiled mode, and have reference output in Results
-TESTS_COMP=attribs1 bitfields1 bitfields2 bitfields3 bitfields4 \
+TESTS_COMP?=attribs1 bitfields1 bitfields2 bitfields3 bitfields4 \
bitfields5 bitfields6 bitfields7 bitfields8 \
builtins-$(ARCH) alignas \
varargs1 varargs2 varargs3 sections alias aligned\
packedstruct1 packedstruct2
+# varargs2 ---> bug in k1-cos-gcc
+ifeq ($(ARCH),mppa_k1c)
+ TESTS_COMP:=$(filter-out varargs2,$(TESTS_COMP))
+endif
+
# Can run, both in compiled mode and in interpreter mode,
# but produce processor-dependent results, so no reference output in Results
diff --git a/test/regression/extasm.c b/test/regression/extasm.c
index 83a07a05..95628f7f 100644
--- a/test/regression/extasm.c
+++ b/test/regression/extasm.c
@@ -21,7 +21,8 @@ int clobbers(int x, int z)
#if (defined(ARCH_x86) && defined(MODEL_64)) \
|| (defined(ARCH_riscV) && defined(MODEL_64)) \
|| (defined(ARCH_powerpc) && defined(MODEL_ppc64)) \
- || (defined(ARCH_powerpc) && defined(MODEL_e5500))
+ || (defined(ARCH_powerpc) && defined(MODEL_e5500)) \
+ || (defined(ARCH_mppa_k1c) && defined(MODEL_64))
#define SIXTYFOUR
#else
#undef SIXTYFOUR
diff --git a/test/regression/packedstruct1.c b/test/regression/packedstruct1.c
index 5d3e7124..ac68c698 100644
--- a/test/regression/packedstruct1.c
+++ b/test/regression/packedstruct1.c
@@ -2,8 +2,8 @@
#include <stdio.h>
-/* offsetof is the offset computed by the verified front-end (cfrontend/) */
-#define offsetof(s,f) (int)&(((struct s *)0)->f)
+/* offsetOf is the offset computed by the verified front-end (cfrontend/) */
+#define offsetOf(s,f) (int)&(((struct s *)0)->f)
/* boffsetof is the offset computed by the elaborator (cparser/) */
#define boffsetof(s,f) (int)__builtin_offsetof(struct s, f)
@@ -23,9 +23,9 @@ void test1(void)
struct s1 s1;
printf("sizeof(struct s1) = %d\n", szof(s1));
printf("precomputed sizeof(struct s1) = %d\n", bszof(s1));
- printf("offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n",
- offsetof(s1,x), offsetof(s1,y), offsetof(s1,z));
- printf("precomputed offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n",
+ printf("offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n",
+ offsetOf(s1,x), offsetOf(s1,y), offsetOf(s1,z));
+ printf("precomputed offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n",
boffsetof(s1,x), boffsetof(s1,y), boffsetof(s1,z));
s1.x = 123; s1.y = -456; s1.z = 3.14159;
printf("s1 = {x = %d, y = %d, z = %.5f}\n\n", s1.x, s1.y, s1.z);
@@ -44,9 +44,9 @@ void test2(void)
printf("sizeof(struct s2) = %d\n", szof(s2));
printf("precomputed sizeof(struct s2) = %d\n", bszof(s2));
printf("&s2 mod 16 = %d\n", ((int) &s2) & 0xF);
- printf("offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n",
- offsetof(s2,x), offsetof(s2,y), offsetof(s2,z));
- printf("precomputed offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n",
+ printf("offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n",
+ offsetOf(s2,x), offsetOf(s2,y), offsetOf(s2,z));
+ printf("precomputed offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n",
boffsetof(s2,x), boffsetof(s2,y), boffsetof(s2,z));
s2.x = 12345; s2.y = -456; s2.z = 3.14159;
printf("s2 = {x = %d, y = %d, z = %.5f}\n\n", s2.x, s2.y, s2.z);
@@ -73,8 +73,8 @@ void test3(void)
printf("sizeof(struct s3) = %d\n", szof(s3));
printf("precomputed sizeof(struct s3) = %d\n", bszof(s3));
- printf("offsetof(s) = %d\n", offsetof(s3,s));
- printf("precomputed offsetof(s) = %d\n", boffsetof(s3,s));
+ printf("offsetOf(s) = %d\n", offsetOf(s3,s));
+ printf("precomputed offsetOf(s) = %d\n", boffsetof(s3,s));
s3.x = 123;
s3.y = 45678;
s3.z = 0x80000001U;
@@ -103,9 +103,9 @@ void test4(void)
printf("sizeof(struct s4) = %d\n", szof(s4));
printf("precomputed sizeof(struct s4) = %d\n", bszof(s4));
- printf("offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n",
- offsetof(s4,x), offsetof(s4,y), offsetof(s4,z));
- printf("precomputed offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n",
+ printf("offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n",
+ offsetOf(s4,x), offsetOf(s4,y), offsetOf(s4,z));
+ printf("precomputed offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n",
boffsetof(s4,x), boffsetof(s4,y), boffsetof(s4,z));
s4.x = 123; s4.y = -456; s4.z = 3.14159;
printf("s4 = {x = %d, y = %d, z = %.5f}\n\n", s4.x, s4.y, s4.z);
@@ -121,9 +121,9 @@ void test5(void)
printf("sizeof(struct s5) = %d\n", szof(s5));
printf("precomputed sizeof(struct s5) = %d\n", bszof(s5));
- printf("offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n",
- offsetof(s5,x), offsetof(s5,y), offsetof(s5,z));
- printf("precomputed offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n",
+ printf("offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n",
+ offsetOf(s5,x), offsetOf(s5,y), offsetOf(s5,z));
+ printf("precomputed offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n",
boffsetof(s5,x), boffsetof(s5,y), boffsetof(s5,z));
s5.x = 123; s5.y = -456; s5.z = 3.14159;
printf("s5 = {x = %d, y = %d, z = %.5f}\n\n", s5.x, s5.y, s5.z);
@@ -139,9 +139,9 @@ void test6(void)
printf("sizeof(struct s6) = %d\n", szof(s6));
printf("precomputed sizeof(struct s6) = %d\n", bszof(s6));
- printf("offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n",
- offsetof(s6,x), offsetof(s6,y), offsetof(s6,z));
- printf("precomputed offsetof(x) = %d, offsetof(y) = %d, offsetof(z) = %d\n",
+ printf("offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n",
+ offsetOf(s6,x), offsetOf(s6,y), offsetOf(s6,z));
+ printf("precomputed offsetOf(x) = %d, offsetOf(y) = %d, offsetOf(z) = %d\n",
boffsetof(s6,x), boffsetof(s6,y), boffsetof(s6,z));
s62.x = 123; s62.y = -456; s62.z = 3.14159;
printf("s62 = {x = %d, y = %d, z = %.5f}\n\n", s62.x, s62.y, s62.z);