https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67716
--- Comment #11 from Kazumoto Kojima <kkojima at gcc dot gnu.org> --- Created attachment 36397 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36397&action=edit patch for targetm.override_options_after_change Could you try this patch? What is going on: 1. align_jumps (global_options.x_align_jumps) is set to 1 as the default value. 2. sh_override_option changes it to 2. 3. pragma handling saves it and sets it back to the default value 1. 4. compile function where align_jumps is 1. This results a bad code with wrong alignments. 5. Restore align_jumps at the end of compilation of this unit. I've noticed that other targets define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE and avoid this issue of pragma for optimization. See aarch64 or alpha's *_override_options_after_change for example.