https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69241
Jason Merrill <jason at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|c++ |ipa --- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> --- This is a problem with the gimple call generated in split_function. It considers functions that return by invisible reference and calls gimple_call_set_return_slot_opt, but doesn't then set the LHS of the call, so we end up allocating a temporary stack slot for it, which is wrong for a TREE_ADDRESSABLE type. It seems that the LHS doesn't get set because m_fn3 doesn't actually have a return statement, but for some reason return_bb is different from the exit block, so we don't get to the code later in split_function that creates a return statement. Changing component to IPA.