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

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

https://gcc.gnu.org/g:773d220dfd5563befe5490d4def283001eba8926

commit r17-7165-g773d220dfd5563befe5490d4def283001eba8926
Author: Eric Botcazou <[email protected]>
Date:   Fri Dec 4 12:18:32 2026 +0100

    Fix __builtin_clear_padding wrt reverse SSO bit-field

    In the case of bit-fields, the implementation of __builtin_clear_padding in
    gimple-fold.cc resorts to low-level fiddling that depends on the
endianness,
    but it does not take into the scalar_storage_order setting of the enclosing
    record type.

    gcc/
            PR middle-end/129249
            * gimple-fold.cc (clear_padding_bitfield): Add REVERSEP parameter
            and flip the test on the target's endianness based on it.
            (clear_padding_union): Adjust call to clear_padding_bitfield.
            (clear_padding_type): Likewise.

    gcc/testsuite/
            * gcc.dg/sso-23.c: New test.

Reply via email to