https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89208

--- Comment #11 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Andrew Pinski from comment #10)
> This is documented this way:
> https://gcc.gnu.org/onlinedocs/gcc-8.2.0/gcc/Standards.html#index-
> ffreestanding
> 
> Most of the compiler support routines used by GCC are present in libgcc, but
> there are a few exceptions. GCC requires the freestanding environment
> provide memcpy, memmove, memset and memcmp. Finally, if __builtin_trap is
> used, and the target does not implement the trap pattern, then GCC emits a
> call to abort.

but this still transforms valid to invalid code,
since as Alexander pointer out, one can call "f(a,a);" which
gets translated to "memcpy(a,a,8);" which is not valid when
src, and dst overlaps, while *a = *a is.

Reply via email to