diff mbox

Fix ipa.c dumping ICE

Message ID 20141002055031.GC30713@kam.mff.cuni.cz
State New
Headers show

Commit Message

Jan Hubicka Oct. 2, 2014, 5:50 a.m. UTC
Hi,
this patch fixes ICE on missing call_stmt during WPA.
diff mbox

Patch

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 215791)
+++ ChangeLog	(working copy)
@@ -1,5 +1,10 @@ 
 2014-10-01  Jan HUbicka  <hubicka@ucw.cz>
 
+	* ipa.c (walk_polymorphic_call_targets): Avoid ICE when
+	dumping during WPA.
+
+2014-10-01  Jan HUbicka  <hubicka@ucw.cz>
+
 	* ipa-prop.c (ipa_modify_formal_parameters): Do not merge
 	type variants.
 
Index: ipa.c
===================================================================
--- ipa.c	(revision 215658)
+++ ipa.c	(working copy)
@@ -198,7 +198,11 @@  walk_polymorphic_call_targets (hash_set<
 
 	  if (dump_enabled_p ())
             {
-	      location_t locus = gimple_location (edge->call_stmt);
+	      location_t locus;
+	      if (edge->call_stmt)
+		locus = gimple_location (edge->call_stmt);
+	      else
+		locus = UNKNOWN_LOCATION;
 	      dump_printf_loc (MSG_OPTIMIZED_LOCATIONS, locus,
                                "devirtualizing call in %s/%i to %s/%i\n",
                                edge->caller->name (), edge->caller->order,