changeset 124:c3a50d7877e8

fix ipa-inline.c
author mir3636
date Sat, 31 Mar 2018 17:18:55 +0900
parents ab229f40eab2
children 2c7bdd5a49f6
files gcc/ipa-inline.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gcc/ipa-inline.c	Fri Mar 30 22:58:55 2018 +0900
+++ b/gcc/ipa-inline.c	Sat Mar 31 17:18:55 2018 +0900
@@ -2180,7 +2180,14 @@
   int *num_calls = (int *)data;
   bool callee_removed = false;
 #ifndef noCbC
-  while (node->callers && !node->global.inlined_to && !node->callers->call_stmt->vdef)
+  bool tail_call_f = false;
+  if (node->callees) {
+    if (node->callees->call_stmt) { 
+      if (node->callees->call_stmt->vdef) 
+        tail_call_f = gimple_call_tail_p (as_a <gcall *> (node->callees->call_stmt->vdef->ssa_name.def_stmt));
+    }
+  }
+  while (node->callers && !node->global.inlined_to && !tail_call_f)
     {
 #else
   while (node->callers && !node->global.inlined_to)