https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124671
--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by H.J. Lu <[email protected]>: https://gcc.gnu.org/g:b4c215b36d63e1c264d8c1bd5d34f9aef1bb8463 commit r16-8339-gb4c215b36d63e1c264d8c1bd5d34f9aef1bb8463 Author: H.J. Lu <[email protected]> Date: Sat Jun 28 06:27:25 2025 +0800 Adjust check for addressable misaligned stack argument Adjust alignment check forcing a local copy if the argument on stack is not aligned to its type and the current alignment, which is determined by the backend, is less than MAX_SUPPORTED_STACK_ALIGNMENT when the parameter has its address taken. For x86, ignore argument passed on stack when updating stack alignment since caller is responsible to align the outgoing stack for arguments passed on stack. gcc/ PR target/120839 PR middle-end/124671 * function.cc (assign_parm_adjust_stack_rtl): Get the parameter as argument. Adjust alignment check forcing a local copy. (assign_parms): Adjust. * config/i386/i386.cc (ix86_argument_passed_on_stack_p): New. (ix86_update_stack_alignment): Ignore argument passed on stack. gcc/testsuite/ PR target/120839 PR middle-end/124671 * gcc.dg/pr124671.c: New test. * gcc.target/i386/pr120839-1a.c: Likewise. * gcc.target/i386/pr120839-1b.c: Likewise. * gcc.target/i386/pr120839-2.c: Likewise. Signed-off-by: H.J. Lu <[email protected]> Co-Authored-By: Richard Biener <[email protected]>
