From 7dd536f1bce276ba0b9b1cadfe6ce42dbfa150e9 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Fri, 2 Jul 2010 09:57:12 +0000 Subject: re PR middle-end/44777 (ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c) 2010-07-02 Richard Guenther PR middle-end/44777 * tree-cfg.c (gimple_block_ends_with_call_p): Handle empty BBs. From-SVN: r161694 --- gcc/ChangeLog | 5 +++++ gcc/tree-cfg.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2e208ca..1d4b467 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-07-02 Richard Guenther + + PR middle-end/44777 + * tree-cfg.c (gimple_block_ends_with_call_p): Handle empty BBs. + 2010-07-02 Jan Hubicka PR middle-end/44706 diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 3b8ab9d..99b8f2a 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -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)); } -- cgit v1.1