aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfgcleanup.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-05-06 11:27:29 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-05-06 11:27:29 +0000
commit0107dca2adf82db79c54d6da9707035533d474d6 (patch)
tree08393bb2ffe3daf1347d560e6951600839f91db7 /gcc/tree-cfgcleanup.c
parente5123d087ed24066c03c97c92a15d255c8d318dd (diff)
downloadgcc-0107dca2adf82db79c54d6da9707035533d474d6.zip
gcc-0107dca2adf82db79c54d6da9707035533d474d6.tar.gz
gcc-0107dca2adf82db79c54d6da9707035533d474d6.tar.bz2
re PR middle-end/57147 (setjmp call and if body wrongly elided (function runs off early end))
2013-05-06 Richard Biener <rguenther@suse.de> PR middle-end/57147 * tree-cfg.c (gimple_purge_dead_abnormal_call_edges): If the edge is also fallthru, preserve it and just clear the abnormal flag. * tree-cfgcleanup.c (remove_fallthru_edge): If the edge is also complex, preserve that and just clear the fallthru flag. * tree-inline.c (update_ssa_across_abnormal_edges): Also update virtual operands. * gcc.dg/torture/pr57147-1.c: New testcase. * gcc.dg/torture/pr57147-2.c: Likewise. * gcc.dg/torture/pr57147-3.c: Likewise. From-SVN: r198625
Diffstat (limited to 'gcc/tree-cfgcleanup.c')
-rw-r--r--gcc/tree-cfgcleanup.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/tree-cfgcleanup.c b/gcc/tree-cfgcleanup.c
index 3c69a7d..9b314f7 100644
--- a/gcc/tree-cfgcleanup.c
+++ b/gcc/tree-cfgcleanup.c
@@ -57,7 +57,10 @@ remove_fallthru_edge (vec<edge, va_gc> *ev)
FOR_EACH_EDGE (e, ei, ev)
if ((e->flags & EDGE_FALLTHRU) != 0)
{
- remove_edge_and_dominated_blocks (e);
+ if (e->flags & EDGE_COMPLEX)
+ e->flags &= ~EDGE_FALLTHRU;
+ else
+ remove_edge_and_dominated_blocks (e);
return true;
}
return false;