https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67716
--- Comment #12 from Oleg Endo <olegendo at gcc dot gnu.org> --- (In reply to Kazumoto Kojima from comment #11) > Created attachment 36397 [details] > 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. Ah right. I missed the #pragma thing in your reduced case, sorry. With your patch, the .align 1 is back after the table. Maybe we should move some more of the sh_option_override things sh_override_options_after_change? I don't know ...