aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2009-01-10 15:02:12 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2009-01-10 15:02:12 +0100
commitb3a796bc64242f478fc5104cfa2e50a7358e2ca9 (patch)
tree5856d424659a38a21079b79f566e8be0b0304085
parentb726f5e6c3c90244570ae64822f06006db966096 (diff)
downloadgcc-b3a796bc64242f478fc5104cfa2e50a7358e2ca9.zip
gcc-b3a796bc64242f478fc5104cfa2e50a7358e2ca9.tar.gz
gcc-b3a796bc64242f478fc5104cfa2e50a7358e2ca9.tar.bz2
re PR target/38695 (gcc.c-torture/compile/pr37433.c ICE on trunk arm_function_in_section_p)
PR target/38695 * config/arm/arm.c (arm_is_long_call_p): Don't call arm_function_in_section_p if decl isn't a FUNCTION_DECL. From-SVN: r143246
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/arm/arm.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 36c5e37..22b14d2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/38695
+ * config/arm/arm.c (arm_is_long_call_p): Don't call
+ arm_function_in_section_p if decl isn't a FUNCTION_DECL.
+
2009-01-09 Steven Bosscher <steven@gcc.gnu.org>
* regrename.c (regrename_optimize): Fix dumping.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index afaade0..dce0a52 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -1,6 +1,7 @@
/* Output routines for GCC for ARM.
Copyright (C) 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ Free Software Foundation, Inc.
Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
and Martin Simmons (@harleqn.co.uk).
More major hacks by Richard Earnshaw (rearnsha@arm.com).
@@ -3360,6 +3361,7 @@ arm_is_long_call_p (tree decl)
/* For "f", be conservative, and only cater for cases in which the
whole of the current function is placed in the same section. */
if (!flag_reorder_blocks_and_partition
+ && TREE_CODE (decl) == FUNCTION_DECL
&& arm_function_in_section_p (decl, current_function_section ()))
return false;