From 950d1cd9ba49d2420f77ae0bc04be4fd6d0d009e Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 23 Jan 2018 08:00:20 +0000 Subject: re PR tree-optimization/83963 ([graphite] ICE in merge_sese, at graphite-scop-detection.c:517) 2018-01-23 Richard Biener PR tree-optimization/83963 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region): Properly terminate dominator walk when crossing the exit edge not when visiting its source block. * gfortran.dg/graphite/pr83963.f: New testcase. * gcc.dg/graphite/pr83963-2.c: Likewise. From-SVN: r256973 --- gcc/graphite-scop-detection.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/graphite-scop-detection.c') diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index 6f407e1..15559ae 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -677,10 +677,10 @@ scop_detection::harmful_loop_in_region (sese_l scop) const if (!stmt_simple_for_scop_p (scop, gsi_stmt (gsi), bb)) return true; - if (bb != exit_bb) - for (basic_block dom = first_dom_son (CDI_DOMINATORS, bb); - dom; - dom = next_dom_son (CDI_DOMINATORS, dom)) + for (basic_block dom = first_dom_son (CDI_DOMINATORS, bb); + dom; + dom = next_dom_son (CDI_DOMINATORS, dom)) + if (dom != scop.exit->dest) worklist.safe_push (dom); } -- cgit v1.1