This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/66940] ifcvt.c:1907 signed integer overflow


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]