re PR middle-end/37913 (ICE: Segmentation fault in link_block, cfg.c:153)
PR middle-end/37913 * tree-cfgcleanup.c (split_bbs_on_noreturn_calls): Only split bbs that haven't been removed yet. * gcc.c-torture/compile/pr37913.c: New test. From-SVN: r141426
This commit is contained in:
parent
a848cf52b5
commit
4d731f1702
4 changed files with 31 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-10-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/37913
|
||||
* tree-cfgcleanup.c (split_bbs_on_noreturn_calls): Only split bbs
|
||||
that haven't been removed yet.
|
||||
|
||||
2008-10-29 Bernd Schmidt <bernd.schmidt@analog.com>
|
||||
|
||||
* config/bfin/bfin.c (struct machine_function): New member
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2008-10-28 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/37913
|
||||
* gcc.c-torture/compile/pr37913.c: New test.
|
||||
|
||||
2008-10-28 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/37663
|
||||
|
|
15
gcc/testsuite/gcc.c-torture/compile/pr37913.c
Normal file
15
gcc/testsuite/gcc.c-torture/compile/pr37913.c
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* PR middle-end/37913 */
|
||||
|
||||
void foo (void) __attribute__ ((noreturn));
|
||||
|
||||
static int __attribute__ ((noreturn))
|
||||
bar (void)
|
||||
{
|
||||
foo ();
|
||||
}
|
||||
|
||||
void
|
||||
baz (void)
|
||||
{
|
||||
int i = bar ();
|
||||
}
|
|
@ -483,7 +483,12 @@ split_bbs_on_noreturn_calls (void)
|
|||
{
|
||||
stmt = VEC_pop (gimple, MODIFIED_NORETURN_CALLS (cfun));
|
||||
bb = gimple_bb (stmt);
|
||||
/* BB might be deleted at this point, so verify first
|
||||
BB is present in the cfg. */
|
||||
if (bb == NULL
|
||||
|| bb->index < NUM_FIXED_BLOCKS
|
||||
|| bb->index >= n_basic_blocks
|
||||
|| BASIC_BLOCK (bb->index) != bb
|
||||
|| last_stmt (bb) == stmt
|
||||
|| !gimple_call_noreturn_p (stmt))
|
||||
continue;
|
||||
|
|
Loading…
Add table
Reference in a new issue