aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-10-09 13:22:22 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-10-09 13:22:22 +0000
commit9f3f7d131fd4200ed84aa44ec75b3c675b8273ae (patch)
tree133509c8695d037b274512d013d8147067a6010f
parentaf2efb2bbb5a923f524f7467cca0d66d805af18d (diff)
downloadgcc-9f3f7d131fd4200ed84aa44ec75b3c675b8273ae.zip
gcc-9f3f7d131fd4200ed84aa44ec75b3c675b8273ae.tar.gz
gcc-9f3f7d131fd4200ed84aa44ec75b3c675b8273ae.tar.bz2
cgraph.c (cgraph_create_edge): Check for NULL call_stmt before calling stmt_can_throw_external.
2009-10-09 Richard Guenther <rguenther@suse.de> * cgraph.c (cgraph_create_edge): Check for NULL call_stmt before calling stmt_can_throw_external. From-SVN: r152587
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/cgraph.c9
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6f67e85..ed31c56 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-09 Richard Guenther <rguenther@suse.de>
+
+ * cgraph.c (cgraph_create_edge): Check for NULL call_stmt
+ before calling stmt_can_throw_external.
+
2009-10-09 Eric Botcazou <ebotcazou@adacore.com>
PR tree-optimization/40071
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 01fbb9a..167e8a8 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;