This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tuples] Fix gimple_alloca_call_p
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Diego Novillo <dnovillo at google dot com>, Aldy Hernandez <aldyh at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 30 May 2008 20:00:15 -0400
- Subject: [tuples] Fix gimple_alloca_call_p
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
Unlike CALL_EXPR, GIMPLE_CALL_EXPR has directly FUNCTION_DECLs
in gimple_call_fn. Without this patch tuples branch inlines functions
using alloca, causing bootstrap failures even with ulimit -s 40000.
Bootstrapped on x86_64-linux, ok for tuples?
2008-05-31 Jakub Jelinek <jakub@redhat.com>
* calls.c (gimple_alloca_call_p): Look for FUNCTION_DECL in
gimple_call_fn instead of ADDR_EXPR.
--- gcc/calls.c.jj 2008-05-28 09:17:31.000000000 +0200
+++ gcc/calls.c 2008-05-31 01:07:22.000000000 +0200
@@ -553,10 +553,8 @@ bool
gimple_alloca_call_p (const_gimple stmt)
{
if (is_gimple_call (stmt)
- && TREE_CODE (gimple_call_fn (stmt)) == ADDR_EXPR
- && (TREE_CODE (TREE_OPERAND (gimple_call_fn (stmt), 0)) == FUNCTION_DECL)
- && (special_function_p (TREE_OPERAND (gimple_call_fn (stmt), 0), 0)
- & ECF_MAY_BE_ALLOCA))
+ && TREE_CODE (gimple_call_fn (stmt)) == FUNCTION_DECL
+ && (special_function_p (gimple_call_fn (stmt), 0) & ECF_MAY_BE_ALLOCA))
return true;
return false;
}
Jakub