https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126215
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. The C++ langhook somehow gimplifies this to x = &names.D.3013.D.3007.b; forgetting to call recompute_tree_invariant_expr.
