summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ipa-inline.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c566a85c18e..bf8306dd58a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-13 Teresa Johnson <tejohnson@google.com>
+
+ PR ipa/58862
+ * ipa-inline.c (edge_badness): Fix overflow.
+
2013-11-13 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/59036
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index f4cb72a9c2b..85f8e5df59f 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -909,7 +909,7 @@ edge_badness (struct cgraph_edge *edge, bool dump)
/* Capping edge->count to max_count. edge->count can be larger than
max_count if an inline adds new edges which increase max_count
after max_count is computed. */
- int edge_count = edge->count > max_count ? max_count : edge->count;
+ gcov_type edge_count = edge->count > max_count ? max_count : edge->count;
sreal_init (&relbenefit_real, relbenefit, 0);
sreal_init (&growth_real, growth, 0);