https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106502
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- As you can see by the gimplification: _1 = std::_V2::system_category (); _2 = std::_V2::system_category (); _3 = _2->_vptr.error_category; _4 = _3 + 16; _5 = *_4; _6 = std::_V2::system_category (); _7 = OBJ_TYPE_REF(_5;(const struct error_category)_1->2B) (_6);