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/81088] UBSAN: false positive as a result of reassosiation


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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Mon Aug 28 12:49:55 2017
New Revision: 251381

URL: https://gcc.gnu.org/viewcvs?rev=251381&root=gcc&view=rev
Log:
2017-08-28  Richard Biener  <rguenther@suse.de>

        Backport from mainline
        2017-06-14  Richard Biener  <rguenther@suse.de>

        PR middle-end/81088
        * fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
        literal constants.
        (fold_binary_loc): When associating do not treat pre-existing
        TREE_OVERFLOW on literal constants as a reason to allow
        TREE_OVERFLOW on associated literal constants.

        * c-c++-common/ubsan/pr81088.c: New testcase.

        2017-06-13  Richard Biener  <rguenther@suse.de>

        PR middle-end/81065
        * fold-const.c (extract_muldiv_1): Remove bogus distribution
        case of C * (x * C2 + C3).
        (fold_addr_of_array_ref_difference): Properly fold index difference.

        * c-c++-common/ubsan/pr81065.c: New testcase.

        2017-06-08  Marek Polacek  <polacek@redhat.com>

        PR sanitize/80932
        * c-c++-common/ubsan/pr80932.c: Test with ints, not with long ints.

        2017-06-07  Marek Polacek  <polacek@redhat.com>

        PR sanitizer/80932
        * fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
        TYPE_OVERFLOW_WRAPS check. 

        * c-c++-common/ubsan/pr80932.c: New test.

Added:
    branches/gcc-7-branch/gcc/testsuite/c-c++-common/ubsan/pr80932.c
    branches/gcc-7-branch/gcc/testsuite/c-c++-common/ubsan/pr81065.c
    branches/gcc-7-branch/gcc/testsuite/c-c++-common/ubsan/pr81088.c
Modified:
    branches/gcc-7-branch/gcc/ChangeLog
    branches/gcc-7-branch/gcc/fold-const.c
    branches/gcc-7-branch/gcc/testsuite/ChangeLog

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