diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2011-01-26 21:11:57 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2011-01-26 21:11:57 +0000 |
commit | bef16e8723179fa878d7faf472eb960b56033996 (patch) | |
tree | 1dd95614331cdc84b7f99f4df9a472f576819869 /gcc | |
parent | c75d884b6dd8c8501cee8d6fcd15b9351cb2c7ac (diff) | |
download | gcc-bef16e8723179fa878d7faf472eb960b56033996.zip gcc-bef16e8723179fa878d7faf472eb960b56033996.tar.gz gcc-bef16e8723179fa878d7faf472eb960b56033996.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cfgcleanup.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20110126-1.c | 18 |
4 files changed, 29 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 606715d..fa574e8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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}. diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c index bf6ca45..aaa0ea5 100644 --- a/gcc/cfgcleanup.c +++ b/gcc/cfgcleanup.c @@ -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; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2744712..e5133d0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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 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 0000000..c55e0c2 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20110126-1.c @@ -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; +} |