This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tuples] Fix gimple_alloca_call_p


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]