This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix ICE in cgraph.c with LTO
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 9 Oct 2009 15:23:06 +0200 (CEST)
- Subject: [PATCH] Fix ICE in cgraph.c with LTO
We properly stream can_throw_external. Committed as obvious.
Richard.
2009-10-09 Richard Guenther <rguenther@suse.de>
* cgraph.c (cgraph_create_edge): Check for NULL call_stmt
before calling stmt_can_throw_external.
Index: gcc/cgraph.c
===================================================================
*** gcc/cgraph.c (revision 152586)
--- gcc/cgraph.c (working copy)
*************** cgraph_create_edge (struct cgraph_node *
*** 822,830 ****
if (call_stmt)
{
#ifdef ENABLE_CHECKING
! /* This is rather pricely check possibly trigerring construction of call stmt
! hashtable. */
! gcc_assert (!cgraph_edge (caller, call_stmt));
#endif
gcc_assert (is_gimple_call (call_stmt));
--- 822,830 ----
if (call_stmt)
{
#ifdef ENABLE_CHECKING
! /* This is rather pricely check possibly trigerring construction of
! call stmt hashtable. */
! gcc_assert (!cgraph_edge (caller, call_stmt));
#endif
gcc_assert (is_gimple_call (call_stmt));
*************** cgraph_create_edge (struct cgraph_node *
*** 847,853 ****
edge->callee = callee;
edge->call_stmt = call_stmt;
push_cfun (DECL_STRUCT_FUNCTION (caller->decl));
! edge->can_throw_external = stmt_can_throw_external (call_stmt);
pop_cfun ();
edge->prev_caller = NULL;
edge->next_caller = callee->callers;
--- 847,854 ----
edge->callee = callee;
edge->call_stmt = call_stmt;
push_cfun (DECL_STRUCT_FUNCTION (caller->decl));
! edge->can_throw_external
! = call_stmt ? stmt_can_throw_external (call_stmt) : false;
pop_cfun ();
edge->prev_caller = NULL;
edge->next_caller = callee->callers;