https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72767
Bug ID: 72767 Summary: [avr] Some branches report too small insn length Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: gjl at gcc dot gnu.org Target Milestone: --- Created attachment 39039 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39039&action=edit nops.c: C test case Some branch instructions report too small instruction length which might lead to problems if other branches crossing the critical ones use a wrong instruction sequence. Outcome can be "relocation truncted to fit" error from the linker. Compile test case with $ avr-gcc -S -dp -Os -mmcu=atmega16 nops.c In bra_63 there is (should be "length = 2"): brne .+2 ; 7 branch [length = 1] rjmp .L1 In bra_2045 (should be "length = 3"): brne .+4 ; 7 branch [length = 2] jmp .L6