Fix modref_transform ICE with more than 32 parameters.
authorJan Hubicka <jh@suse.cz>
Sat, 10 Oct 2020 20:01:17 +0000 (22:01 +0200)
committerJan Hubicka <jh@suse.cz>
Sat, 10 Oct 2020 20:01:17 +0000 (22:01 +0200)
* ipa-modref.c (modref_transform): Use reserve instead of safe_grow.

gcc/ipa-modref.c

index 2b561fe31792cc6d3d4cd0cdc2d6c7d3fcf0764b..4330b9ec10ee5d8fb4e5d10e35f43c6a39d0336e 100644 (file)
@@ -1367,7 +1367,7 @@ modref_transform (struct cgraph_node *node)
 
   auto_vec <int, 32> map;
 
-  map.safe_grow (max + 1);
+  map.reserve (max + 1);
   for (i = 0; i <= max; i++)
     map.quick_push (-1);
   FOR_EACH_VEC_SAFE_ELT (node->clone.param_adjustments->m_adj_params, i, p)