Commit 4d731f17 by Jakub Jelinek Committed by Jakub Jelinek

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
parent a848cf52
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
......
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
* gcc.dg/pr37663.c: Require int32plus.
......
/* 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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment