aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2017-11-22 08:47:47 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2017-11-22 08:47:47 +0000
commit8f8e53262b59836866fee7e4381117fcf6dc7b38 (patch)
treef218cf54abd1212cc2bd5811493ef7a76cb39d4d /gcc
parentce143aa6e3d1d8dee4dad9cfd71774c5c3b9511b (diff)
downloadgcc-8f8e53262b59836866fee7e4381117fcf6dc7b38.zip
gcc-8f8e53262b59836866fee7e4381117fcf6dc7b38.tar.gz
gcc-8f8e53262b59836866fee7e4381117fcf6dc7b38.tar.bz2
re PR tree-optimization/83089 (ICE: Segmentation fault (in instantiate_scev_name))
2017-11-22 Richard Biener <rguenther@suse.de> PR tree-optimization/83089 * tree-if-conv.c (pass_if_conversion::execute): If anything changed reset SCEV and free the number of iteration estimates. * gcc.dg/pr83089.c: New testcase. From-SVN: r255044
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr83089.c27
-rw-r--r--gcc/tree-if-conv.c6
4 files changed, 44 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 60af13a..fb8de9a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2017-11-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/83089
+ * tree-if-conv.c (pass_if_conversion::execute): If anything
+ changed reset SCEV and free the number of iteration estimates.
+
2017-11-21 Martin Sebor <msebor@redhat.com>
PR tree-optimization/82945
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b3e371e..e3ea2f5 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2017-11-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/83089
+ * gcc.dg/pr83089.c: New testcase.
+
2017-11-21 David Malcolm <dmalcolm@redhat.com>
PR c/83056
diff --git a/gcc/testsuite/gcc.dg/pr83089.c b/gcc/testsuite/gcc.dg/pr83089.c
new file mode 100644
index 0000000..4508948
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr83089.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-loop-if-convert -ftree-parallelize-loops=2" } */
+
+int rl, s8;
+
+void
+it (int zy, short int el)
+{
+ int hb;
+
+ while (el != 0)
+ {
+ hb = el;
+ for (rl = 0; rl < 200; ++rl)
+ {
+ for (s8 = 0; s8 < 2; ++s8)
+ {
+ }
+ if (s8 < 3)
+ zy = hb;
+ if (hb == 0)
+ ++s8;
+ zy += (s8 != -1);
+ }
+ el = zy;
+ }
+}
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index c74c803..37695c2 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -2959,6 +2959,12 @@ pass_if_conversion::execute (function *fun)
&& !loop->dont_vectorize))
todo |= tree_if_conversion (loop);
+ if (todo)
+ {
+ free_numbers_of_iterations_estimates (fun);
+ scev_reset ();
+ }
+
if (flag_checking)
{
basic_block bb;