https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67745
--- Comment #1 from chrbr at gcc dot gnu.org --- the problems are three folds: - FUNCTION_BOUNDARY should not test optimize_size, that should be tested in override_options_internal instead to be carried by invoke_set_current_function_hook - FUNCTION_BOUNDARY depends on TARGET_THUMB that depends on the attribute target. So it should be reevaluated at each function change, thus TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE