OSDN Git Service

PR tree-optimization/23625
authordpatel <dpatel@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Sep 2005 21:44:55 +0000 (21:44 +0000)
committerdpatel <dpatel@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Sep 2005 21:44:55 +0000 (21:44 +0000)
     * tree-flow-inline.h (bsi_after_labels): Remove, first statement is
     LABEL_EXPR, assertion check.

     * gcc.dg/PR23625.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104711 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr23625.c [new file with mode: 0644]
gcc/tree-flow-inline.h

index d1db15e..8963cab 100644 (file)
@@ -1,3 +1,10 @@
+2005-09-27  Daniel Berlin  <dberlin@dberlin.org>
+           Devang Patel  <dpatel@apple.com>
+
+       PR tree-optimization/23625
+       * tree-flow-inline.h (bsi_after_labels): Remove, first statement is
+       LABEL_EXPR, assertion check.
+       
 2005-09-27  J"orn Rennecke <joern.rennecke@st.com>
 
        * optabs.c (no_conflict_move_test): Check if a result of a
index 9fd016a..61bf586 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-27  Devang Patel  <dpatel@apple.com>
+
+       PR tree-optimization/23625
+       * gcc.dg/pr23625.c: New test.
+       
 2005-09-27  Uros Bizjak  <uros@kss-loka.si>
 
        * gcc.target/i386/pr22585.c: Run on 32-bit x86 only.
diff --git a/gcc/testsuite/gcc.dg/pr23625.c b/gcc/testsuite/gcc.dg/pr23625.c
new file mode 100644 (file)
index 0000000..aaeddb2
--- /dev/null
@@ -0,0 +1,27 @@
+/* Test case for PR23625 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-loop-linear" } */
+
+typedef long INT32;
+void find_best_colors ()
+{
+int ic0, ic1, ic2;
+INT32 * bptr;
+INT32 dist1;
+INT32 dist2;
+INT32 xx1;
+for (ic0 = (1<<(5 -3))-1;ic0 >= 0;ic0--)
+{
+  for (ic1 = (1<<(6 -3))-1;ic1 >= 0;ic1--)
+  {
+    dist2 = dist1;
+     for (ic2 = (1<<(5 -3))-1;ic2 >= 0;ic2--)
+     {
+        *bptr = dist2;
+        bptr++;
+     }
+     dist1 += xx1;
+  }
+}
+}
+
index b317c8c..d8b57a5 100644 (file)
@@ -727,7 +727,7 @@ bsi_start (basic_block bb)
   return bsi;
 }
 
-/* Return a block statement iterator that points to the last label in
+/* Return a block statement iterator that points to the first non-label
    block BB.  */
 
 static inline block_stmt_iterator
@@ -750,13 +750,6 @@ bsi_after_labels (basic_block bb)
   if (tsi_end_p (bsi.tsi))
     return bsi;
 
-  /* Ensure that there are some labels.  The rationale is that we want
-     to insert after the bsi that is returned, and these insertions should
-     be placed at the start of the basic block.  This would not work if the
-     first statement was not label; rather fail here than enable the user
-     proceed in wrong way.  */
-  gcc_assert (TREE_CODE (tsi_stmt (bsi.tsi)) == LABEL_EXPR);
-
   next = bsi.tsi;
   tsi_next (&next);