https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66215
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- IMHO the nops should go immediately before the first real instruction in the function. The point of not emitting it earlier is so that the nops are already covered by debug and unwind info. So, we certainly should skip all NOTEs at the start of the function, and perhaps selected other insns (dunno if e.g. UNSPECV_MAIN_POOL insn emits any code or not). NOTE_INSN_FUNCTION_BEG is not a good place, as it can be preceeded by various prologue instructions, and the nops really have to go before all real instructions (that emit some bytes into the function text section).