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 cc796ac4bcedb0ba67718604e676ea05002ccaea..6f3431b347971e6305cb19ec6d092445fba458f9 100644 (file)
@@ -1,3 +1,8 @@
+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
index 51a1b1a986d6a73e08933814542e99993f2eb682..ad9584ed3d6333f998623f208a0978ba0391c24c 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;