https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65837
--- Comment #26 from ktkachov at gcc dot gnu.org --- So, out of interest, what is needed to make this work properly with target attributes? What hooks do we need to implement? Looking at https://gcc.gnu.org/onlinedocs/gccint/Target-Attributes.html#Target-Attributes I think it should be TARGET_OPTION_SAVE and TARGET_OPTION_RESTORE and also the builtin initialisation hook should be changed, but I can't figure out how TARGET_OPTION_{SAVE, RESTORE} are used (are they even relevant?)