aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-inline-transform.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ipa-inline-transform.c')
-rw-r--r--gcc/ipa-inline-transform.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c
index 60a2962..7bb291c 100644
--- a/gcc/ipa-inline-transform.c
+++ b/gcc/ipa-inline-transform.c
@@ -269,7 +269,10 @@ inline_call (struct cgraph_edge *e, bool update_original,
|| predicated);
#endif
- if (overall_size)
+ /* Account the change of overall unit size; external functions will be
+ removed and are thus not accounted. */
+ if (overall_size
+ && !DECL_EXTERNAL (to->symbol.decl))
*overall_size += new_size - old_size;
ncalls_inlined++;