[Bug tree-optimization/122380] [15/16 regression] std::variant with std::vectors of differing types may lead to double frees since r15-5595

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Mar 7 07:18:48 GMT 2026


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

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I wonder if pre is combining the loads of _M_start when doing the delete as
they are on the same offset. But using the aliasing set for std::vector<int> .

And then when dse3 comes along, it thinks the stores to _M_start (and others)
are not needed since the load is now in a different aliasing set.


More information about the Gcc-bugs mailing list