ipa.c (walk_polymorphic_call_targets): Avoid ICE when dumping during WPA.
authorJan Hubicka <hubicka@ucw.cz>
Thu, 2 Oct 2014 05:49:32 +0000 (07:49 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 2 Oct 2014 05:49:32 +0000 (05:49 +0000)
* ipa.c (walk_polymorphic_call_targets): Avoid ICE when
dumping during WPA.

From-SVN: r215792

gcc/ChangeLog
gcc/ipa.c

index 354fa6aadc8dfd2c2dccda5bdf8b33711c86556a..5ca618375c44f99b61cc70014d2ce84dfdcda5d4 100644 (file)
@@ -1,9 +1,14 @@
-2014-10-01  Jan HUbicka  <hubicka@ucw.cz>
+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.
 
-2014-10-01  Jan HUbicka  <hubicka@ucw.cz>
+2014-10-01  Jan Hubicka  <hubicka@ucw.cz>
 
        * ipa-polymorphic-call.c
        (ipa_polymorphic_call_context::restrict_to_inner_class):
index 3c35e473e97bbb4744e21f3c6ef48ba6f08a4e35..c8d7ab918da4efc85265b6f681a128a3f0c809da 100644 (file)
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -198,7 +198,11 @@ walk_polymorphic_call_targets (hash_set<void *> *reachable_call_targets,
 
          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,