aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite-scop-detection.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-02-28 15:33:33 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-02-28 15:33:33 +0000
commit0e0e545fc6f1afcaebe9bafa45ab0a42332de945 (patch)
tree570c48adea6afaf5c3e803869eeaa4df0c36d314 /gcc/graphite-scop-detection.c
parentb44f8ad8b2138f7bfd68053e8dce596adb964735 (diff)
downloadgcc-0e0e545fc6f1afcaebe9bafa45ab0a42332de945.zip
gcc-0e0e545fc6f1afcaebe9bafa45ab0a42332de945.tar.gz
gcc-0e0e545fc6f1afcaebe9bafa45ab0a42332de945.tar.bz2
re PR tree-optimization/84584 ([graphite] ICE: Segmentation fault (in dominated_by_p))
2018-02-28 Richard Biener <rguenther@suse.de> PR tree-optimization/84584 * graphite-scop-detection.c (scop_detection::add_scop): Discard SCoPs with fake exit edge. * gcc.dg/graphite/pr84584.c: New testcase. From-SVN: r258070
Diffstat (limited to 'gcc/graphite-scop-detection.c')
-rw-r--r--gcc/graphite-scop-detection.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index 2331dec..48e4014 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -590,6 +590,15 @@ scop_detection::add_scop (sese_l s)
{
gcc_assert (s);
+ /* If the exit edge is fake discard the SCoP for now as we're removing the
+ fake edges again after analysis. */
+ if (s.exit->flags & EDGE_FAKE)
+ {
+ DEBUG_PRINT (dp << "[scop-detection-fail] Discarding infinite loop SCoP: ";
+ print_sese (dump_file, s));
+ return;
+ }
+
/* Include the BB with the loop-closed SSA PHI nodes, we need this
block in the region for code-generating out-of-SSA copies.
canonicalize_loop_closed_ssa makes sure that is in proper shape. */