re PR target/48807 (Segfault building newlib for bfin)

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.

From-SVN: r174567
This commit is contained in:
Stuart Henderson 2011-06-02 16:16:52 +00:00
parent b935d3be25
commit 6e588138db
2 changed files with 8 additions and 0 deletions

View 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.

View 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;
}