[Bug lto/61001] Builtin memcpy and memset cannot be overridden when -flto is used
hp at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun May 11 03:09:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61001
Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hp at gcc dot gnu.org
--- Comment #3 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
(In reply to Marc Glisse from comment #2)
> -fno-builtin-memcmp is not a hack, it is necessary, even without -flto.
> Without it, linking is not the only thing that may fail. gcc may look at
> your implementation, recognize that it is doing the same thing as memcmp,
> and replace it with a call to memcmp...
True in part. Each code implementing the standard NAME function should
themselves be compiled with the corresponding -fno-builtin-NAME. But other
than that, there should be no restrictions or required options. There are
likely bugs hiding (like, -flto combined with compiling the implementation of
such a function) so PLEASE:
Provide a test-case or you'll at most receive cryptic comments like this one.
More information about the Gcc-bugs
mailing list