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

--- Comment #57 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Yong <[email protected]>:

https://gcc.gnu.org/g:4a0bca2e9e919353574bef3a200229e29d435679

commit r17-4650-g4a0bca2e9e919353574bef3a200229e29d435679
Author: Oleg Tolmatcev <[email protected]>
Date:   Wed Sep 16 20:41:25 2026 +0200

    testsuite, i386: add tests for over-aligned stack objects [PR54412]

    Cover the places where an object needs more alignment than the frame can
    give it: the home slot of a by-value parameter, both when nothing else sees
    it and when its address escapes to a callee, the hidden copy the caller
makes
    when the MS ABI passes an argument by reference, and a copy that GCC merely
    prefers to over-align.

    Where nothing else sees the object, it only has to be stored with a move
that
    matches its slot, so those tests scan for the move GCC selects.  Where the
    address escapes, the object must really be aligned, so those tests scan for
    the mask that rounds the slot address up.  None of them runs the code: a
slot
    that is short of the alignment the object needs still lands on a 32-byte
    boundary about half the time.

    The dg-do run C++ test covers an over-aligned temporary used on both arms
of
    a branch.

    gcc/testsuite/ChangeLog:

            PR target/54412
            * g++.target/i386/pr54412-highpart-extract-rt.C: New test.
            * gcc.target/i386/pr54412-aligned-struct-byval-temp.c: New test.
            * gcc.target/i386/pr54412-blkmode-temp-biggest-align.c: New test.
            * gcc.target/i386/pr54412-escaping-param.c: New test.
            * gcc.target/i386/pr54412-m256-byval-param.c: New test.

    Signed-off-by: Oleg Tolmatcev <[email protected]>
    Signed-off-by: Jonathan Yong <[email protected]>

Reply via email to