https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70016
--- Comment #2 from ktkachov at gcc dot gnu.org --- this_target_ira_int->x_init_cost is NULL when it's used, causing the ICE. I would have expected target_reinit to have properly initialised it when called through save_target_globals_default_opts. Unfortunately I'm not very familiar with the globals target switching logic so it's not immediately clear to me where the fix should be. If I call ira_init () after init_regs () in target_reinit () in toplev.c then the ICE goes away, but is that the correct place to do it?