[Bug tree-optimization/105327] Bogus use-after-free warning new in GCC 12

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Dec 25 00:58:50 GMT 2022


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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Switching around the order to do:

    g.p_ = 0;
    P p (new (v) T);

Fixes the warning and I think correctly.


More information about the Gcc-bugs mailing list