tree-sra.c (some_callers_have_mismatched_arguments_p): Allow thunk callers.
authorIlya Enkovich <ilya.enkovich@intel.com>
Mon, 19 Jan 2015 10:28:34 +0000 (10:28 +0000)
committerIlya Enkovich <ienkovich@gcc.gnu.org>
Mon, 19 Jan 2015 10:28:34 +0000 (10:28 +0000)
* tree-sra.c (some_callers_have_mismatched_arguments_p): Allow thunk
callers.

From-SVN: r219835

gcc/ChangeLog
gcc/tree-sra.c

index cc796ac..6f3431b 100644 (file)
@@ -1,5 +1,10 @@
 2015-01-19  Ilya Enkovich  <ilya.enkovich@intel.com>
 
+       * tree-sra.c (some_callers_have_mismatched_arguments_p): Allow thunk
+       callers.
+
+2015-01-19  Ilya Enkovich  <ilya.enkovich@intel.com>
+
        * ipa-chkp.c (chkp_produce_thunks): Add early param
        to split thunks production into two passes.  Keep
        'always_inline' function bodies after the first pass.
index 51a1b1a..ad9584e 100644 (file)
@@ -4884,7 +4884,7 @@ some_callers_have_mismatched_arguments_p (struct cgraph_node *node,
 {
   struct cgraph_edge *cs;
   for (cs = node->callers; cs; cs = cs->next_caller)
-    if (!callsite_arguments_match_p (cs->call_stmt))
+    if (!cs->call_stmt || !callsite_arguments_match_p (cs->call_stmt))
       return true;
 
   return false;