Hi gcc-patches mailing list, Richard Earnshaw <[email protected]> has requested that the following forgejo pull request be published on the mailing list.
Created on: 2025-12-05 16:36:37+00:00 Latest update: 2025-12-05 16:39:42+00:00 Changes: 1 changed files, 7 additions, 2 deletions Head revision: rearnsha/gcc-TEST ref ubsan-comparison commit 068d8c06acb9db76a24bcbb80a16a956beeb790f Base revision: gcc/gcc-TEST ref trunk commit 27210c145b0b293c2958b8cd8ff3ee7f6867a8a0 r16-5912-g27210c145b0b29 Merge base: 27210c145b0b293c2958b8cd8ff3ee7f6867a8a0 Full diff url: https://forge.sourceware.org/gcc/gcc-TEST/pulls/130.diff Discussion: https://forge.sourceware.org/gcc/gcc-TEST/pulls/130 Requested Reviewers: There was UB in arm_canonicalize_comparison if it is called with both operands of type VOIDmode. Avoid this by first handling floating-point types, then returning if we are left with anything other than an integer mode. For belt-and-braces also check that the mode does not require a mask larger than HOST_WIDE_INT. gcc/ChangeLog: PR target/122999 * config/arm/arm.cc (arm_canonicalize_comparison): Defer initializing maxval until we know we are dealing with an integer mode. Thanks for taking the time to contribute to GCC! Please be advised that https://forge.sourceware.org/ is currently a trial that is being used by the GCC community to experiment with a new workflow based on pull requests. Pull requests sent here may be forgotten or ignored. Patches that you want to propose for inclusion in GCC should use the existing email-based workflow, see https://gcc.gnu.org/contribute.html Changed files: - M: gcc/config/arm/arm.cc Richard Earnshaw (1): arm: avoid invalid shift in arm_canonicalize_comparison [PR122999] gcc/config/arm/arm.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- 2.52.0
