Infinite recursion with memcpy and memset/memclr lowerings
David Nadlinger
code at klickverbot.at
Sat Jul 21 13:44:25 UTC 2018
On 20 Jul 2018, at 2:35, Mike Franklin via digitalmars-d-ldc wrote:
> FYI, I tried to implement my own `memcpy` and `memset` implementations
> and just have `__aeabi_memcpy` and `__aeabi_memclr` forward to those,
> but then the compiler recognized the `memcpy` and `memset` calls and
> replaced them with `__aeabi_memcpy` and `__aeabi_memclr`. :-/
Yep, this is expected behaviour without something like `-fno-builtin` or
`-disable-simplify-libcalls`. C runtime libraries (glibc/compiler-rt…)
are of course in exactly the same situation with GCC/Clang.
— David
More information about the digitalmars-d-ldc
mailing list