https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114132
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Georg-Johann Lay <g...@gcc.gnu.org>: https://gcc.gnu.org/g:2f43ad6a60adb8dd4af9a3c78dfe78597e891c9e commit r14-9241-g2f43ad6a60adb8dd4af9a3c78dfe78597e891c9e Author: Georg-Johann Lay <a...@gjlay.de> Date: Thu Feb 29 18:08:45 2024 +0100 AVR: target/114132 - Code sets up a frame pointer without need. The condition CUMULATIVE_ARGS.nregs == 0 in avr_frame_pointer_required_p() means that no more argument registers are left, but that's not the same condition that tells whether an argument pointer is required. PR target/114132 gcc/ * config/avr/avr.h (CUMULATIVE_ARGS) <has_stack_args>: New field. * config/avr/avr.cc (avr_init_cumulative_args): Initialize it. (avr_function_arg): Set it. (avr_frame_pointer_required_p): Use it instead of .nregs. gcc/testsuite/ * gcc.target/avr/pr114132-1.c: New test. * gcc.target/avr/torture/pr114132-2.c: New test.