Fix ipa-modref ICE with not allocated summaries.
authorJan Hubicka <jh@suse.cz>
Sat, 10 Oct 2020 19:22:52 +0000 (21:22 +0200)
committerJan Hubicka <jh@suse.cz>
Sat, 10 Oct 2020 19:22:52 +0000 (21:22 +0200)
* ipa-modref.c (modref_transform): Check that summaries are allocated.

gcc/ipa-modref.c

index 9392d73a9419cb9128ecf1dbf4e0a5a52af5bcc3..2b561fe31792cc6d3d4cd0cdc2d6c7d3fcf0764b 100644 (file)
@@ -1343,7 +1343,7 @@ remap_arguments (vec <int> *map, modref_records *tt)
 static unsigned int
 modref_transform (struct cgraph_node *node)
 {
-  if (!node->clone.param_adjustments)
+  if (!node->clone.param_adjustments || !summaries)
     return 0;
   modref_summary *r = summaries->get (node);
   if (!r)