diff options
author | Thomas Preud'homme <robotux@celest.fr> | 2020-08-14 23:04:13 +0100 |
---|---|---|
committer | Thomas Preud'homme <robotux@celest.fr> | 2020-08-14 23:04:13 +0100 |
commit | afd09586d7ead4f146ad7a7a471be34196b3c6bc (patch) | |
tree | 87854be29fb4264b979b700fa45445f58faa4c26 /tests/tests2/103_implicit_memmove.c | |
parent | e2ccf3981d78dfeb390d22c74625b60310100abb (diff) |
New upstream version 0.9.27+git20200814.62c30a4a
Diffstat (limited to 'tests/tests2/103_implicit_memmove.c')
-rw-r--r-- | tests/tests2/103_implicit_memmove.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/tests2/103_implicit_memmove.c b/tests/tests2/103_implicit_memmove.c new file mode 100644 index 0000000..1592fb2 --- /dev/null +++ b/tests/tests2/103_implicit_memmove.c @@ -0,0 +1,20 @@ +/* Test that the memmove TCC is emitting for the struct copy + and hence implicitely declares can be declared properly also + later. */ +struct S { int a,b,c,d, e[1024];}; +int foo (struct S *a, struct S *b) +{ + *a = *b; + return 0; +} + +void *memmove(void*,const void*,__SIZE_TYPE__); +void foo2 (struct S *a, struct S *b) +{ + memmove(a, b, sizeof *a); +} + +int main() +{ + return 0; +} |