From patchwork Wed Oct 12 19:24:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Fix number of arguments in call to alloca_with_align From: Tom de Vries X-Patchwork-Id: 119285 Message-Id: <4E95E97E.2060804@mentor.com> To: Richard Guenther Cc: "gcc-patches@gcc.gnu.org" Date: Wed, 12 Oct 2011 21:24:46 +0200 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 * 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. */