https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81430
--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> --- Created attachment 41788 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41788&action=edit for lto1, call finish_options after cl_optimization_restore in invoke_set_current_function_hook This is an attempt to actually fix the issue, by reusing finish_options in lto1.