https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116407
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by Georg-Johann Lay <g...@gcc.gnu.org>: https://gcc.gnu.org/g:58c8882ff5ba249ef4cfc99f3c3f8ada8810f75a commit r13-8980-g58c8882ff5ba249ef4cfc99f3c3f8ada8810f75a Author: Georg-Johann Lay <a...@gjlay.de> Date: Sun Aug 18 15:00:55 2024 +0200 AVR: target/116407 - Fix linker error "relocation truncated to fit". Some text peepholes output extra instructions prior to a branch instruction and that increase the jump offset of backward branches. PR target/116407 gcc/ * config/avr/avr-protos.h (avr_jump_mode): Add an int argument. * config/avr/avr.cc (avr_jump_mode): Add an int argument to increase the computed jump offset of backwards branches. * config/avr/avr.md (*dec-and-branchhi!=-1, *dec-and-branchsi!=-1): Increase the jump offset used by avr_jump_mode() as needed. gcc/testsuite/ * gcc.target/avr/torture/pr116407-2.c: New test. * gcc.target/avr/torture/pr116407-4.c: New test. (cherry picked from commit dfb2e8caa85d1059a0ab8ed4f19568c04c9f13a4)