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 middle-end/67662] -fsanitize=undefined cries wolf for X - 1 + X when X is 2**30


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67662

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Wed Sep 23 14:09:48 2015
New Revision: 228051

URL: https://gcc.gnu.org/viewcvs?rev=228051&root=gcc&view=rev
Log:
2015-09-23   Richard Biener  <rguenther@suse.de>

        PR middle-end/67662
        * fold-const.c (fold_binary_loc): Do not reassociate two vars with
        undefined overflow unless they will cancel out.

        * gcc.dg/ubsan/pr67662.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/ubsan/pr67662.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/fold-const.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]