https://gcc.gnu.org/bugzilla/show_bug.cgi?id=129249
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-16 branch has been updated by Eric Botcazou <[email protected]>: https://gcc.gnu.org/g:365663d56d99296791dc8045acb135ce6a40bcb1 commit r16-10060-g365663d56d99296791dc8045acb135ce6a40bcb1 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.
