http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56888
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rguenth at gcc dot gnu.org --- Comment #21 from Richard Biener <rguenth at gcc dot gnu.org> --- -fno-tree-loop-distribute-patterns is the reliable way to not transform loops into library calls. As of the trivial case of generating a recursion - yes, that's reasonably easy to avoid in simple cases. But if you consider t1.c ---- mymemcpy_impl (...) { for (...) ... } t2.c ---- memcpy () { mymemcpy_impl () } then it's no longer possible to detect conservatively without severely restricting the set of functions we can operate on. Not sure if/how other compilers avoid the above situation (or if they do this at all or rather use private entries into the library functions).