From: Eric Botcazou Date: Wed, 26 Jan 2011 21:14:27 +0000 (+0000) Subject: re PR rtl-optimization/44469 (internal compiler error: in fixup_reorder_chain, at... X-Git-Tag: releases/gcc-4.5.3~270 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=515507e0986aa0d73185c4444e0ab77f5d7809b5;p=thirdparty%2Fgcc.git 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: r169305 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index daba315259dd..69151dcb61c8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-01-26 Eric Botcazou + + PR rtl-optimization/44469 + * cfgcleanup.c (try_optimize_cfg): Iterate in CFG layout mode too + after removing trivially dead basic blocks. + 2011-01-25 Richard Guenther PR tree-optimization/47411 diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index e63125aec541..c4e65555f7e9 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -1928,8 +1928,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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7eb83817dadb..28d35b1afe4a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-01-26 Eric Botcazou + + * gcc.c-torture/compile/20110126-1.c: New test. + 2011-01-25 Tobias Burnus Backport from mainline diff --git a/gcc/testsuite/gcc.c-torture/compile/20110126-1.c b/gcc/testsuite/gcc.c-torture/compile/20110126-1.c new file mode 100644 index 000000000000..c55e0c2055db --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20110126-1.c @@ -0,0 +1,18 @@ +/* PR rtl-optimization/44469 */ +/* Testcase by Siarhei Siamashka */ + +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; +}