[Bug tree-optimization/102676] Failure to optimize out malloc/nothrow allocation that's only used for bool checking

gabravier at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Oct 10 13:50:29 GMT 2021


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

--- Comment #2 from Gabriel Ravier <gabravier at gmail dot com> ---
Well, I think the assumption LLVM is making is that the allocation, being
unused, can just be eliminated and considered to have always succeeded. I don't
see how that would contradict the standard, although I suppose some would
consider it a bad thing to do for the compiler (although in that case you might
as well rule out all optimizations that elide allocations).


More information about the Gcc-bugs mailing list