https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122527
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Georg-Johann Lay <[email protected]>: https://gcc.gnu.org/g:a56bab18b048d0edf8f8d81735982dee8b08bc78 commit r15-10476-ga56bab18b048d0edf8f8d81735982dee8b08bc78 Author: Georg-Johann Lay <[email protected]> Date: Sun Nov 2 15:12:59 2025 +0100 AVR: target/122527 -- Don't use __load_N to load from __flash1. This patch fixes a case where a 3 byte or 4 byte load from __flash1 uses __load_3/4 to read the value, which is wrong. This only occured when the device has ELPM but not ELPMx (avr31). PR target/122527 gcc/ * config/avr/avr.cc (avr_load_libgcc_p): Return false if the address-space is not ADDR_SPACE_FLASH. (avr_out_lpm_no_lpmx [addr=REG]): Handle sizes of 3 and 4 bytes. (cherry picked from commit 0b2c031cca4017c5f87af519f0977b33b4bcb284)
