diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-03-03 08:17:40 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2020-03-03 08:17:40 +0100 |
commit | 1ab7b51c30e1b10ac45b0bd64cefdc01da0f7f68 (patch) | |
tree | 210ffc156c83f04fb0c61a40b4f9037d7ba8a7e1 /test/regression/varargs2.c | |
parent | 222c9047d61961db9c6b19fed5ca49829223fd33 (diff) | |
parent | 12be46d59a2483a10d77fa8ee67f7e0ca1bd702f (diff) | |
download | compcert-kvx-1ab7b51c30e1b10ac45b0bd64cefdc01da0f7f68.tar.gz compcert-kvx-1ab7b51c30e1b10ac45b0bd64cefdc01da0f7f68.zip |
Merge branch 'mppa-cse2' of gricad-gitlab.univ-grenoble-alpes.fr:sixcy/CompCert into mppa-work
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, |