[Bug target/123271] [13/14/15/16 Regression] -ftrapv fails to detect overflow on ARM32 since GCC 10 since r10-3995
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 11 11:28:03 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123271
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Earnshaw <rearnsha@gcc.gnu.org>:
https://gcc.gnu.org/g:f1065aba22dbf8cdf218cf60ccac310d758651e1
commit r16-8003-gf1065aba22dbf8cdf218cf60ccac310d758651e1
Author: Richard Earnshaw <rearnsha@arm.com>
Date: Wed Mar 11 11:14:47 2026 +0000
arm: Fix trapping arithmetic [PR123271]
Patch r10-3995 accidentally defined insn patterns that overrode the
default behaviour of overflow-trapping arithmetic; this broke the
implementation of -ftrapv. Fixed by renaming the internal patterns.
For consistency I've renamed more than is strictly necessary.
gcc/ChangeLog:
PR target/123271
* config/arm/arm.md (subvsi3_intmin): Renamed to ...
(sub_cmpVsi3_intmin): ... this.
(subvsi3): Renamed to ...
(sub_cmpVsi3): ... this.
(subvsi3_imm1): Renamed to ...
(sub_cmpVsi3_imm1): ... this.
(usubvsi3_borrow): Renamed to ...
(usub_cmpVsi3_borrow): ... this.
(usubvsi3_borrow_imm): Renamed to ...
(usub_cmpVsi3_borrow_imm): ... this.
(subvsi3_borrow): Renamed to ...
(sub_cmpVsi3_borrow): ... this.
(subvsi3_borrow_imm): Renamed to ...
(sub_cmpVsi3_borrow_imm): ... this.
gcc/testsuite/ChangeLog:
PR target/123271
* gcc.target/arm/pr123271.c: New test.
More information about the Gcc-bugs
mailing list