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

--- Comment #48 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Christopher Nerz from comment #47)
> But shouldn't both give the same value?

I'm not sure what the standard says to this.  Does std::launder(...)
sanitize earlier "undefined behavior"?  For example failing to initialize
an object?

> The return of the new and the std::launder(...) point to the same object and
> are both equal read-operations! It is imho not predictable that they behave
> differently.

One load we can optimize to a constant, the other not (because of .LAUNDER).

Reply via email to