https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124697

--- Comment #12 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:cc33cf487524e738e3bb723154ce315dda4fefdd

commit r16-8383-gcc33cf487524e738e3bb723154ce315dda4fefdd
Author: H.J. Lu <[email protected]>
Date:   Tue Mar 31 08:59:50 2026 -0700

    Check BIGGEST_ALIGNMENT when forcing a local copy

    BIGGEST_ALIGNMENT is the biggest alignment that any data type can require
    on the target machine.  It is not the biggest alignment that is supported,
    just the biggest alignment that, when violated, may cause a fault.

    MAX_SUPPORTED_STACK_ALIGNMENT is the maximum stack alignment guaranteed by
    the backend.  If SUPPORTS_STACK_ALIGNMENT is false, it is defined as
    PREFERRED_STACK_BOUNDARY.

    Adjust alignment check forcing a local copy if the argument on stack is
    not aligned to its type and the current alignment is less than the
    minimum of BIGGEST_ALIGNMENT and MAX_SUPPORTED_STACK_ALIGNMENT.

    gcc/

            PR middle-end/124697
            * function.cc (assign_parm_adjust_stack_rtl): Force a local copy
            if the current alignment is less than the minimum of
            BIGGEST_ALIGNMENT and MAX_SUPPORTED_STACK_ALIGNMENT.

    gcc/testsuite/

            PR middle-end/124697
            * gcc.target/i386/pr120839-1b.c: Adjusted.
            * gcc.target/i386/pr124697-1a.c: New test.
            * gcc.target/i386/pr124697-1b.c: Likewise.
            * gcc.target/i386/pr124697-2a.c: Likewise.
            * gcc.target/i386/pr124697-2b.c: Likewise.
            * gcc.target/i386/pr124697-3a.c: Likewise.
            * gcc.target/i386/pr124697-3b.c: Likewise.

    Signed-off-by: H.J. Lu <[email protected]>

Reply via email to