OSDN Git Service

2011-06-02 Stuart Henderson <shenders@gcc.gnu.org>
authorshenders <shenders@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Jun 2011 16:16:52 +0000 (16:16 +0000)
committershenders <shenders@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Jun 2011 16:16:52 +0000 (16:16 +0000)
    PR target/48807
    * config/bfin/bfin.c (bfin_function_ok_for_sibcall): Check return value
    of cgraph_local_info for null before attempting to use it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174567 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/bfin/bfin.c

index c44ba41..5bd12d2 100644 (file)
@@ -1,3 +1,9 @@
+2011-06-02  Stuart Henderson  <shenders@gcc.gnu.org>
+
+       PR target/48807
+       * config/bfin/bfin.c (bfin_function_ok_for_sibcall): Check return value
+       of cgraph_local_info for null before attempting to use it.
+
 2011-06-02  Eric Botcazou  <ebotcazou@adacore.com>
 
        * function.h (struct stack_usage): Remove dynamic_alloc_count field.
index 4f371fd..0b860c5 100644 (file)
@@ -2110,6 +2110,8 @@ bfin_function_ok_for_sibcall (tree decl ATTRIBUTE_UNUSED,
  
   this_func = cgraph_local_info (current_function_decl);
   called_func = cgraph_local_info (decl);
+  if (!called_func)
+    return false;
   return !called_func->local || this_func->local;
 }
 \f