2018-02-08 Jan Hubicka <hubicka@ucw.cz>
+ * lto-partition.c (lto_balanced_map): Watch overflow.
+
+2018-02-08 Jan Hubicka <hubicka@ucw.cz>
+
PR ipa/81360
* lto.c (unify_scc): Register prevailing trees, not trees to be freed.
(read_cgraph_and_symbols): Use
if (npartitions < n_lto_partitions)
partition_size = total_size / (n_lto_partitions - npartitions);
else
- partition_size = INT_MAX;
+ /* Watch for overflow. */
+ partition_size = INT_MAX / 16;
if (partition_size < PARAM_VALUE (MIN_PARTITION_SIZE))
partition_size = PARAM_VALUE (MIN_PARTITION_SIZE);