PR rtl-optimization/46649
* sel-sched-ir.c (purge_empty_blocks): Unconditionally skip the first
basic block in the region.
testsuite:
* g++.dg/opt/pr46649.C: New.
From-SVN: r167854
+2010-12-15 Alexander Monakov <amonakov@ispras.ru>
+
+ PR rtl-optimization/46649
+ * sel-sched-ir.c (purge_empty_blocks): Unconditionally skip the first
+ basic block in the region.
+
2010-12-15 Joseph Myers <joseph@codesourcery.com>
* config/stormy16/stormy16.h (LINK_SPEC, WCHAR_TYPE): Define.
void
purge_empty_blocks (void)
{
- /* Do not attempt to delete preheader. */
- int i = sel_is_loop_preheader_p (BASIC_BLOCK (BB_TO_BLOCK (0))) ? 1 : 0;
+ int i;
- while (i < current_nr_blocks)
+ /* Do not attempt to delete the first basic block in the region. */
+ for (i = 1; i < current_nr_blocks; )
{
basic_block b = BASIC_BLOCK (BB_TO_BLOCK (i));
+2010-12-15 Alexander Monakov <amonakov@ispras.ru>
+
+ PR rtl-optimization/46649
+ * g++.dg/opt/pr46649.C: New.
+
2010-12-15 Dave Korn <dave.korn.cygwin@gmail.com>
PR testsuite/46938
--- /dev/null
+// { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } }
+// { dg-options "-fschedule-insns -fselective-scheduling" }
+
+void foo ()
+{
+ for (;;)
+ for (;;({break;}))
+ ;
+}