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 c/84607] [6 Regression] Side effects discarded in address computation inside 'if'


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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Jun 21 09:50:36 2018
New Revision: 261839

URL: https://gcc.gnu.org/viewcvs?rev=261839&root=gcc&view=rev
Log:
2018-06-21  Richard Biener  <rguenther@suse.de>

        Backport from mainline
        2018-02-28  Richard Biener  <rguenther@suse.de>

        PR middle-end/84607
        * genmatch.c (capture_info::walk_match): Do not mark
        captured expressions without operands as expr_p given
        they act more like predicates and should be subject to
        "lost tail" side-effect preserving.

        * gcc.dg/pr84607.c: New testcase.

        2018-05-04  Richard Biener  <rguenther@suse.de>

        PR middle-end/85588
        * fold-const.c (negate_expr_p): Restrict negation of operand
        zero of a division to when we know that can happen without
        overflow.
        (fold_negate_expr_1): Likewise.

        * gcc.dg/torture/pr85588.c: New testcase.
        * gcc.dg/torture/pr57656.c: Use dg-additional-options.

Added:
    branches/gcc-6-branch/gcc/testsuite/gcc.dg/pr84607.c
    branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr85588.c
Modified:
    branches/gcc-6-branch/gcc/ChangeLog
    branches/gcc-6-branch/gcc/fold-const.c
    branches/gcc-6-branch/gcc/genmatch.c
    branches/gcc-6-branch/gcc/testsuite/ChangeLog
    branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr57656.c

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