[Bug middle-end/80362] [5 Regression] gcc miscompiles arithmetic with signed char

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 18 13:15:00 GMT 2017


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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Mon Sep 18 13:14:45 2017
New Revision: 252926

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

        Backport from mainline
        2017-04-10  Richard Biener  <rguenther@suse.de>

        PR middle-end/80362
        * fold-const.c (fold_binary_loc): Look at unstripped ops when
        looking for NEGATE_EXPR in -A / -B to A / B folding.

        * gcc.dg/torture/pr80362.c: New testcase.

        2015-11-25  Richard Biener  <rguenther@suse.de>

        PR middle-end/68528
        * fold-const.c (fold_binary_loc): Do not call negate_expr_p
        on stripped operands.

        * gcc.dg/torture/pr68528.c: New testcase.

        2017-03-27  Richard Biener  <rguenther@suse.de>

        PR middle-end/80171
        * gimple-fold.c (fold_ctor_reference): Properly guard against
        NULL return value from canonicalize_constructor_val.

        * g++.dg/torture/pr80171.C: New testcase.

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

        PR middle-end/64516
        * fold-const.c (fold_unary_loc): Preserve alignment when
        folding a VIEW_CONVERT_EXPR into a MEM_REF.

        * gcc.dg/align-3.c: New testcase.

Added:
    branches/gcc-5-branch/gcc/testsuite/g++.dg/torture/pr80171.C
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/align-3.c
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr68528.c
    branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr80362.c
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/fold-const.c
    branches/gcc-5-branch/gcc/gimple-fold.c
    branches/gcc-5-branch/gcc/testsuite/ChangeLog


More information about the Gcc-bugs mailing list