diff --git a/tccgen.c b/tccgen.c index b04c6b8..9405761 100644 --- a/tccgen.c +++ b/tccgen.c @@ -2576,7 +2576,8 @@ ST_FUNC void vstore(void) vpush_global_sym(&func_old_type, TOK_memcpy4); else #endif - vpush_global_sym(&func_old_type, TOK_memcpy); + /* Use memmove, rather than memcpy, as dest and src may be same: */ + vpush_global_sym(&func_old_type, TOK_memmove); vswap(); /* source */