aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2018-01-11 18:46:01 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2018-01-11 17:46:01 +0000
commit0526ed2aef5ba7faa8ea26015e9854db82a71395 (patch)
tree6a051a2a597b48848496adda5a5ea9f6e557b696 /gcc/tree-inline.c
parent2a3af45c6b932a9697484c681b35b1dd87efce65 (diff)
downloadgcc-0526ed2aef5ba7faa8ea26015e9854db82a71395.zip
gcc-0526ed2aef5ba7faa8ea26015e9854db82a71395.tar.gz
gcc-0526ed2aef5ba7faa8ea26015e9854db82a71395.tar.bz2
re PR middle-end/83718 (ICE: Floating point exception in profile_count::apply_scale)
PR middle-end/83718 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling after they are computed. * g++.dg/torture/pr83718.C: New testcase. From-SVN: r256544
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 5910745..b0d9beb 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -2683,8 +2683,6 @@ copy_cfg_body (copy_body_data * id,
profile_count den = ENTRY_BLOCK_PTR_FOR_FN (src_cfun)->count;
profile_count num = entry_block_map->count;
- profile_count::adjust_for_ipa_scaling (&num, &den);
-
cfun_to_copy = id->src_cfun = DECL_STRUCT_FUNCTION (callee_fndecl);
/* Register specific tree functions. */
@@ -2707,6 +2705,8 @@ copy_cfg_body (copy_body_data * id,
ENTRY_BLOCK_PTR_FOR_FN (cfun)->count = den;
}
+ profile_count::adjust_for_ipa_scaling (&num, &den);
+
/* Must have a CFG here at this point. */
gcc_assert (ENTRY_BLOCK_PTR_FOR_FN
(DECL_STRUCT_FUNCTION (callee_fndecl)));