re PR rtl-optimization/44469 (internal compiler error: in fixup_reorder_chain, at cfglayout.c:797)

PR rtl-optimization/44469
	* cfgcleanup.c (try_optimize_cfg): Iterate in CFG layout mode too
	after removing trivially dead basic blocks.

From-SVN: r169304
This commit is contained in:
Eric Botcazou 2011-01-26 21:11:57 +00:00 committed by Eric Botcazou
parent c75d884b6d
commit bef16e8723
4 changed files with 29 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/44469
* cfgcleanup.c (try_optimize_cfg): Iterate in CFG layout mode too
after removing trivially dead basic blocks.
2011-01-26 Joseph Myers <joseph@codesourcery.com>
* config/bfin/bfin.h (LINK_SPEC): Remove %{Qy:} %{!Qn:-Qy}.

View File

@ -2341,8 +2341,7 @@ try_optimize_cfg (int mode)
}
}
delete_basic_block (b);
if (!(mode & CLEANUP_CFGLAYOUT))
changed = true;
changed = true;
/* Avoid trying to remove ENTRY_BLOCK_PTR. */
b = (c == ENTRY_BLOCK_PTR ? c->next_bb : c);
continue;

View File

@ -1,3 +1,7 @@
2011-01-26 Eric Botcazou <ebotcazou@adacore.com>
* gcc.c-torture/compile/20110126-1.c: New test.
2011-01-26 Jakub Jelinek <jakub@redhat.com>
PR c/47473

View File

@ -0,0 +1,18 @@
/* PR rtl-optimization/44469 */
/* Testcase by Siarhei Siamashka <siarhei.siamashka@gmail.com> */
int a (int *t, const char *p)
{
if (*t == 0)
{
}
else if (*t == 1)
{
p = (const char *)t;
}
else
__builtin_unreachable();
if (p[0])
return 0;
return 1;
}