This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/78731] [5 Regression] Possible bug with switch when optimization is turned on.
- 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: Wed, 14 Dec 2016 10:32:09 +0000
- Subject: [Bug tree-optimization/78731] [5 Regression] Possible bug with switch when optimization is turned on.
- Auto-submitted: auto-generated
- References: <bug-78731-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78731
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Wed Dec 14 10:31:37 2016
New Revision: 243641
URL: https://gcc.gnu.org/viewcvs?rev=243641&root=gcc&view=rev
Log:
2016-12-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/78731
* tree-ssa-threadedge.c (simplify_control_stmt_condition):
If we've seen a backedge to not walk the SSA value chain.
(thread_around_empty_blocks): Pass down whether we've seen
a backedge to simplify_control_stmt_condition.
(thread_through_normal_block): Likewise.
* gcc.dg/torture/pr78731.c: New testcase.
Added:
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr78731.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/tree-ssa-threadedge.c