Remove assert in get_def_bb_for_const
authorTom de Vries <tom@codesourcery.com>
Mon, 30 May 2016 07:49:42 +0000 (07:49 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Mon, 30 May 2016 07:49:42 +0000 (07:49 +0000)
2016-05-30  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/69067
* graphite-isl-ast-to-gimple.c (get_def_bb_for_const): Remove assert.

* gcc.dg/graphite/pr69067.c: New test.

From-SVN: r236868

gcc/ChangeLog
gcc/graphite-isl-ast-to-gimple.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/graphite/pr69067.c [new file with mode: 0644]

index cde2b8df151d47473f30572226047478e4ed2e68..3aa51c9ffa53a0f34927c60460108ae874694c67 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-30  Tom de Vries  <tom@codesourcery.com>
+
+       PR tree-optimization/69067
+       * graphite-isl-ast-to-gimple.c (get_def_bb_for_const): Remove assert.
+
 2016-05-29  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/71245
index 049a4c5ed3fa81c0951d6e2115b50b46f30f0010..ff1d91f62665879b34104ce20bde9ccf46f2ec00 100644 (file)
@@ -1792,7 +1792,6 @@ get_def_bb_for_const (basic_block bb, basic_block old_bb) const
        b1 = b2;
     }
 
-  gcc_assert (b1);
   return b1;
 }
 
index 2313b8656c4b1de3f63f6a5c8c283a8c67babb0a..be6710268cb5f0dcc7b9e789a72ae2237b4a534e 100644 (file)
@@ -1,3 +1,8 @@
+2016-05-30  Tom de Vries  <tom@codesourcery.com>
+
+       PR tree-optimization/69067
+       * gcc.dg/graphite/pr69067.c: New test.
+
 2016-05-29  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/71245
diff --git a/gcc/testsuite/gcc.dg/graphite/pr69067.c b/gcc/testsuite/gcc.dg/graphite/pr69067.c
new file mode 100644 (file)
index 0000000..d767381
--- /dev/null
@@ -0,0 +1,28 @@
+/* { dg-do link } */
+/* { dg-options " -O1 -floop-nest-optimize" } */
+/* { dg-additional-options "-flto" { target lto } } */
+
+int a1, c1, cr, kt;
+int aa[2];
+
+int
+ce (void)
+{
+  while (a1 < 1)
+    {
+      int g8;
+      for (g8 = 0; g8 < 3; ++g8)
+       if (c1 != 0)
+         cr = aa[a1 * 2] = kt;
+      for (c1 = 0; c1 < 2; ++c1)
+       aa[c1] = cr;
+      ++a1;
+    }
+  return 0;
+}
+
+int
+main (void)
+{
+  return ce (aa);
+}