diff options
author | Cyril SIX <cyril.six@kalray.eu> | 2019-09-25 11:07:29 +0200 |
---|---|---|
committer | Cyril SIX <cyril.six@kalray.eu> | 2019-09-25 11:07:29 +0200 |
commit | 798ea13f2e46ee4cea3c4950702109c823d8c053 (patch) | |
tree | 484da33fb4a8ad22bc1c43f04062f9414cb1de20 /test/regression/varargs2.c | |
parent | d70a3ff650fcaa6f4247c4ae6173cd97a50eb00d (diff) | |
download | compcert-kvx-798ea13f2e46ee4cea3c4950702109c823d8c053.tar.gz compcert-kvx-798ea13f2e46ee4cea3c4950702109c823d8c053.zip |
varargs2 now work correctly (bis)
Diffstat (limited to 'test/regression/varargs2.c')
-rw-r--r-- | test/regression/varargs2.c | 16 |
1 files changed, 15 insertions, 1 deletions
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, |