This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/66940] ifcvt.c:1907 signed integer overflow
- From: "ktkachov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 May 2016 15:53:57 +0000
- Subject: [Bug rtl-optimization/66940] ifcvt.c:1907 signed integer overflow
- Auto-submitted: auto-generated
- References: <bug-66940-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66940
--- Comment #3 from ktkachov at gcc dot gnu.org ---
Author: ktkachov
Date: Wed May 25 15:53:21 2016
New Revision: 236728
URL: https://gcc.gnu.org/viewcvs?rev=236728&root=gcc&view=rev
Log:
[RTL ifcvt] PR rtl-optimization/66940: Avoid signed overflow in
noce_get_alt_condition
PR rtl-optimization/66940
* ifcvt.c (noce_get_alt_condition): Check that incrementing or
decrementing desired_val will not overflow before performing these
operations.
* gcc.c-torture/execute/pr66940.c: New test.
Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr66940.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ifcvt.c
trunk/gcc/testsuite/ChangeLog