[Bug target/122539] CMSE wrongfully clearing non padded union members
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 12 10:51:10 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122539
--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andre Simoes Dias Vieira
<avieira@gcc.gnu.org>:
https://gcc.gnu.org/g:4aa3af633c26d61ad2a247bb3399cf815dd757e3
commit r16-5193-g4aa3af633c26d61ad2a247bb3399cf815dd757e3
Author: Andre Vieira <andre.simoesdiasvieira@arm.com>
Date: Wed Nov 12 10:25:14 2025 +0000
arm: Fix CMSE clearing of union members with no padding [PR122539]
This patch fixes the CMSE register clearing to make sure we don't clear
registers used by a function call. Before this patch the algorithm would
only
correctly handle registers with padding bits to clear, any registers that
were
fully utilised would be wrongfully cleared.
gcc/ChangeLog:
PR target/122539
* config/arm/arm.cc (comp_not_to_clear_mask_str_un): Update
not_to_clear_reg_mask for union members.
gcc/testsuite/ChangeLog:
* gcc.target/arm/cmse/union-3.x: New test.
* gcc.target/arm/cmse/baseline/union-3.c: New test.
* gcc.target/arm/cmse/mainline/8m/union-3.c: New test.
* gcc.target/arm/cmse/mainline/8_1m/union-3.c: New test.
More information about the Gcc-bugs
mailing list