PR debug/46561
* tree-parloops.c (try_create_redunction_list): Ignore debug stmts
when looking for immediate uses.
* gcc.dg/autopar/pr46561.c: New test.
From-SVN: r166975
2010-11-20 Jakub Jelinek <jakub@redhat.com>
+ PR debug/46561
+ * tree-parloops.c (try_create_redunction_list): Ignore debug stmts
+ when looking for immediate uses.
+
PR tree-optimization/45830
* stmt.c (expand_switch_using_bit_tests_p): New function.
(expand_case): Use it.
2010-11-20 Jakub Jelinek <jakub@redhat.com>
+ PR debug/46561
+ * gcc.dg/autopar/pr46561.c: New test.
+
PR c++/46538
* g++.dg/other/error34.C: New test.
--- /dev/null
+/* PR debug/46561 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -ftree-parallelize-loops=2 -fcompare-debug" } */
+
+extern void abort (void);
+
+void foo (char *c)
+{
+ int i;
+ unsigned x = 0;
+ {
+ for (i = 0; i < 64; i += 4)
+ x = x | *((unsigned *) (&c[i]));
+ if (x)
+ abort ();
+ }
+}
reduc_phi = NULL;
FOR_EACH_IMM_USE_FAST (use_p, imm_iter, val)
{
- if (flow_bb_inside_loop_p (loop, gimple_bb (USE_STMT (use_p))))
+ if (!gimple_debug_bind_p (USE_STMT (use_p))
+ && flow_bb_inside_loop_p (loop, gimple_bb (USE_STMT (use_p))))
{
reduc_phi = USE_STMT (use_p);
break;