aboutsummaryrefslogtreecommitdiffstats
path: root/test/regression
diff options
context:
space:
mode:
authorCyril SIX <cyril.six@kalray.eu>2019-09-25 11:07:29 +0200
committerCyril SIX <cyril.six@kalray.eu>2019-09-25 11:07:29 +0200
commit798ea13f2e46ee4cea3c4950702109c823d8c053 (patch)
tree484da33fb4a8ad22bc1c43f04062f9414cb1de20 /test/regression
parentd70a3ff650fcaa6f4247c4ae6173cd97a50eb00d (diff)
downloadcompcert-kvx-798ea13f2e46ee4cea3c4950702109c823d8c053.tar.gz
compcert-kvx-798ea13f2e46ee4cea3c4950702109c823d8c053.zip
varargs2 now work correctly (bis)
Diffstat (limited to 'test/regression')
-rw-r--r--test/regression/Makefile2
-rw-r--r--test/regression/varargs2.c16
2 files changed, 15 insertions, 3 deletions
diff --git a/test/regression/Makefile b/test/regression/Makefile
index 70c5f253..01f365e3 100644
--- a/test/regression/Makefile
+++ b/test/regression/Makefile
@@ -25,9 +25,7 @@ TESTS_COMP?=attribs1 bitfields1 bitfields2 bitfields3 bitfields4 \
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))
TESTS_COMP:=$(filter-out packedstruct1,$(TESTS_COMP))
TESTS_COMP:=$(filter-out packedstruct2,$(TESTS_COMP))
endif
diff --git a/test/regression/varargs2.c b/test/regression/varargs2.c
index b96d1940..84860ef3 100644
--- a/test/regression/varargs2.c
+++ b/test/regression/varargs2.c
@@ -115,15 +115,27 @@ void printf_compat(const char * fmt, ...)
}
/* The test harness */
-
int main()
{
miniprintf("An int: %d\n", 42);
miniprintf("A long long: %l\n", 123456789012345LL);
miniprintf("A string: %s\n", "Hello world");
miniprintf("A double: %e\n", 3.141592654);
+
+#ifndef __K1C__
miniprintf("A small struct: %y\n", (struct Y) { 'x', 12 });
miniprintf("A bigger struct: %z\n", (struct Z) { 123, 456, 789 });
+#endif
+
+#ifdef __K1C__
+ miniprintf("A mixture: %c & %s & %d & %l & %e & %f\n",
+ 'x',
+ "Hello, world!",
+ 42,
+ 123456789012345LL,
+ 3.141592654,
+ 2.71828182);
+#else
miniprintf("A mixture: %c & %s & %y & %d & %l & %e & %f\n",
'x',
"Hello, world!",
@@ -132,6 +144,8 @@ int main()
123456789012345LL,
3.141592654,
2.71828182);
+#endif
+
miniprintf2("Twice: %d %e\n", -1, 1.23);
miniprintf3("With va_copy: %d %e\n", -1, 1.23);
miniprintf_extra(0, 1, 2, 3, 4, 5, 6, 7,