This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix number of arguments in call to alloca_with_align
- From: Tom de Vries <Tom_deVries at mentor dot com>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 12 Oct 2011 21:24:46 +0200
- Subject: [PATCH] Fix number of arguments in call to alloca_with_align
Richard,
This patch fixes a trivial problem in gimplify_parameters, introduced by the
patch that introduced BUILT_IN_ALLOCA_WITH_ALIGN.
BUILT_IN_ALLOCA_WITH_ALIGN has 2 parameters, so the number of arguments in the
corresponding build_call_expr should be 2, not 1.
Bootstrapped and reg-tested (including Ada) on x86_64.
OK for trunk?
Thanks,
- Tom
2011-10-12 Tom de Vries <tom@codesourcery.com>
* function.c (gimplify_parameters): Set number of arguments of call to
BUILT_IN_ALLOCA_WITH_ALIGN to 2.
Index: gcc/function.c
===================================================================
--- gcc/function.c (revision 179773)
+++ gcc/function.c (working copy)
@@ -3636,7 +3636,7 @@ gimplify_parameters (void)
local = build_fold_indirect_ref (addr);
t = built_in_decls[BUILT_IN_ALLOCA_WITH_ALIGN];
- t = build_call_expr (t, 1, DECL_SIZE_UNIT (parm),
+ t = build_call_expr (t, 2, DECL_SIZE_UNIT (parm),
size_int (DECL_ALIGN (parm)));
/* The call has been built for a variable-sized object. */