From patchwork Wed Oct 12 19:24:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 119285 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 45AF0B6F18 for ; Thu, 13 Oct 2011 06:25:55 +1100 (EST) Received: (qmail 13852 invoked by alias); 12 Oct 2011 19:25:53 -0000 Received: (qmail 13817 invoked by uid 22791); 12 Oct 2011 19:25:52 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 12 Oct 2011 19:25:35 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1RE4Qo-0001Xp-Fa from Tom_deVries@mentor.com ; Wed, 12 Oct 2011 12:25:34 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 12 Oct 2011 12:25:34 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Wed, 12 Oct 2011 20:25:31 +0100 Message-ID: <4E95E97E.2060804@mentor.com> Date: Wed, 12 Oct 2011 21:24:46 +0200 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15 MIME-Version: 1.0 To: Richard Guenther CC: "gcc-patches@gcc.gnu.org" Subject: [PATCH] Fix number of arguments in call to alloca_with_align Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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. */