re PR middle-end/44777 (ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c)

2010-07-02  Richard Guenther  <rguenther@suse.de>

	PR middle-end/44777
	* tree-cfg.c (gimple_block_ends_with_call_p): Handle empty BBs.

From-SVN: r161694
This commit is contained in:
Richard Guenther 2010-07-02 09:57:12 +00:00 committed by Richard Biener
parent 84c2219af1
commit 7dd536f1bc
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-07-02 Richard Guenther <rguenther@suse.de>
PR middle-end/44777
* tree-cfg.c (gimple_block_ends_with_call_p): Handle empty BBs.
2010-07-02 Jan Hubicka <jh@suse.cz>
PR middle-end/44706

View File

@ -6626,7 +6626,7 @@ static bool
gimple_block_ends_with_call_p (basic_block bb)
{
gimple_stmt_iterator gsi = gsi_last_nondebug_bb (bb);
return is_gimple_call (gsi_stmt (gsi));
return !gsi_end_p (gsi) && is_gimple_call (gsi_stmt (gsi));
}