aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2018-04-30 13:40:47 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2018-04-30 11:40:47 +0000
commite693ebce815cd4d29cb0e438e61a692624423628 (patch)
treecf2145964c7693bb2a90ae1a98e8d0385f54ea2c /gcc
parentaf1682fc3aaff288f7ac95cf5585971cef15f0ab (diff)
downloadgcc-e693ebce815cd4d29cb0e438e61a692624423628.zip
gcc-e693ebce815cd4d29cb0e438e61a692624423628.tar.gz
gcc-e693ebce815cd4d29cb0e438e61a692624423628.tar.bz2
* lto-partition.c (lto_balanced_map): Fix sanity check.
From-SVN: r259759
Diffstat (limited to 'gcc')
-rw-r--r--gcc/lto/ChangeLog4
-rw-r--r--gcc/lto/lto-partition.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 6d00e4e..d54ef50 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,7 @@
+2018-04-20 Jan Hubicka <jh@suse.cz>
+
+ * lto-partition.c (lto_balanced_map): Fix sanity check.
+
2018-04-19 Jan Hubicka <jh@suse.cz>
* lto-partition.c: Include sreal.h
diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c
index d83eba2..3efebe7 100644
--- a/gcc/lto/lto-partition.c
+++ b/gcc/lto/lto-partition.c
@@ -809,7 +809,7 @@ lto_balanced_map (int n_lto_partitions, int max_partition_size)
next_nodes.safe_push (noreorder[noreorder_pos++]);
/* For one partition the cost of boundary should be 0 unless we added final
symbols here (these are not accounted) or we have accounting bug. */
- gcc_assert (next_nodes.length () || npartitions != 1 || !best_cost);
+ gcc_assert (next_nodes.length () || npartitions != 1 || !best_cost || best_cost == -1);
add_sorted_nodes (next_nodes, partition);
free (order);