aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorStuart Henderson <shenders@gcc.gnu.org>2011-06-02 16:16:52 +0000
committerStuart Henderson <shenders@gcc.gnu.org>2011-06-02 16:16:52 +0000
commit6e588138db4f545f3d14b96fe946150b594294ae (patch)
treee89e60bfed11654e3a419002bef9e64f61f30465 /gcc
parentb935d3be2569893117cd550b8572e05a802a16e4 (diff)
downloadgcc-6e588138db4f545f3d14b96fe946150b594294ae.zip
gcc-6e588138db4f545f3d14b96fe946150b594294ae.tar.gz
gcc-6e588138db4f545f3d14b96fe946150b594294ae.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/bfin/bfin.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c44ba41..5bd12d2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 4f371fd..0b860c5 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -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;
}