summaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-09 13:22:22 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-09 13:22:22 +0000
commit0780673fc12eed6a345e4a1784dc27f7f0d8335f (patch)
tree133509c8695d037b274512d013d8147067a6010f /gcc/cgraph.c
parent7e55a0d132158ca80eac37188e06b92bd7ffd008 (diff)
downloadgcc-0780673fc12eed6a345e4a1784dc27f7f0d8335f.tar.gz
2009-10-09 Richard Guenther <rguenther@suse.de>
* cgraph.c (cgraph_create_edge): Check for NULL call_stmt before calling stmt_can_throw_external. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152587 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 01fbb9a85d7..167e8a8e7b4 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -822,9 +822,9 @@ cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee,
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));
+ /* 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));
@@ -847,7 +847,8 @@ cgraph_create_edge (struct cgraph_node *caller, struct cgraph_node *callee,
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);
+ edge->can_throw_external
+ = call_stmt ? stmt_can_throw_external (call_stmt) : false;
pop_cfun ();
edge->prev_caller = NULL;
edge->next_caller = callee->callers;