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).