aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2018-01-14 12:20:31 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2018-01-14 11:20:31 +0000
commit3f05a4f0727bac6f4456fbbecdc1315cc8bd59cf (patch)
treed9cb2c24510576f53ed1943d209df058e1162c80 /gcc/ipa-inline.c
parent01b9bf0615e178e6c31f8d010cb8df9382b3c2d4 (diff)
downloadgcc-3f05a4f0727bac6f4456fbbecdc1315cc8bd59cf.zip
gcc-3f05a4f0727bac6f4456fbbecdc1315cc8bd59cf.tar.gz
gcc-3f05a4f0727bac6f4456fbbecdc1315cc8bd59cf.tar.bz2
re PR ipa/83051 (ICE on valid code at -O3: in edge_badness, at ipa-inline.c:1024)
PR ipa/83051 * gcc.c-torture/compile/pr83051.c: New testcase. * ipa-inline.c (edge_badness): Tolerate roundoff errors. From-SVN: r256659
Diffstat (limited to 'gcc/ipa-inline.c')
-rw-r--r--gcc/ipa-inline.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ipa-inline.c b/gcc/ipa-inline.c
index c3acfb29..145ffbb 100644
--- a/gcc/ipa-inline.c
+++ b/gcc/ipa-inline.c
@@ -997,7 +997,8 @@ edge_badness (struct cgraph_edge *edge, bool dump)
/* Check that inlined time is better, but tolerate some roundoff issues.
FIXME: When callee profile drops to 0 we account calls more. This
should be fixed by never doing that. */
- gcc_checking_assert ((edge_time - callee_info->time).to_int () <= 0
+ gcc_checking_assert ((edge_time * 100
+ - callee_info->time * 101).to_int () <= 0
|| callee->count.ipa ().initialized_p ());
gcc_checking_assert (growth <= callee_info->size);