From: Richard Biener Date: Mon, 5 Mar 2018 12:49:07 +0000 (+0000) Subject: re PR tree-optimization/84650 ([graphite] ICE: Segmentation fault (in create_new_iv)) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=144a822fec6d680b2847f2bd35a6d6ebefd2d885;p=gcc.git re PR tree-optimization/84650 ([graphite] ICE: Segmentation fault (in create_new_iv)) 2018-03-05 Richard Biener PR tree-optimization/84650 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache if executed in the loop pipeline. * gcc.dg/graphite/pr84650.c: New testcase. From-SVN: r258242 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bd2c768820f..ba2a9c47e3a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-03-05 Richard Biener + + PR tree-optimization/84650 + * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache + if executed in the loop pipeline. + 2018-03-05 Sandra Loosemore * doc/configfiles.texi (Configuration Files): Move info about diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8e7e53b8546..48c40fa8f7f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-03-05 Richard Biener + + PR tree-optimization/84650 + * gcc.dg/graphite/pr84650.c: New testcase. + 2018-03-05 Paolo Carlini PR c++/82022 diff --git a/gcc/testsuite/gcc.dg/graphite/pr84650.c b/gcc/testsuite/gcc.dg/graphite/pr84650.c new file mode 100644 index 00000000000..e59d16184f1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/graphite/pr84650.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -fgraphite-identity -fno-tree-copy-prop --param lim-expensive=3" } */ + +unsigned int dj; + +void +np (void) +{ + const unsigned int uw = 2; + unsigned int eu; + + for (eu = 0; eu < uw; ++eu) + { + for (dj = 0; dj < uw; ++dj) + ; + eu -= !!(dj - uw - 1); + } +} diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c index 4655766ddbe..030aac0b616 100644 --- a/gcc/tree-ssa-loop-im.c +++ b/gcc/tree-ssa-loop-im.c @@ -2616,6 +2616,8 @@ pass_lim::execute (function *fun) if (!in_loop_pipeline) loop_optimizer_finalize (); + else + scev_reset (); return todo; }