This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/84607] [6 Regression] Side effects discarded in address computation inside 'if'
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Jun 2018 09:51:08 +0000
- Subject: [Bug c/84607] [6 Regression] Side effects discarded in address computation inside 'if'
- Auto-submitted: auto-generated
- References: <bug-84607-4@http.gcc.gnu.org/bugzilla/>
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