From patchwork Tue Aug 31 12:22:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramana Radhakrishnan X-Patchwork-Id: 63238 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 EC2CAB7138 for ; Tue, 31 Aug 2010 22:23:25 +1000 (EST) Received: (qmail 25527 invoked by alias); 31 Aug 2010 12:23:19 -0000 Received: (qmail 25389 invoked by uid 22791); 31 Aug 2010 12:23:16 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, TW_FN, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cam-admin0.cambridge.arm.com (HELO cam-admin0.cambridge.arm.com) (217.140.96.50) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 31 Aug 2010 12:23:06 +0000 Received: from cam-owa1.Emea.Arm.com (cam-owa1.emea.arm.com [10.1.255.62]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id o7VCLMF9000874; Tue, 31 Aug 2010 13:21:22 +0100 (BST) Received: from [10.1.66.29] ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Tue, 31 Aug 2010 13:23:00 +0100 Subject: [Patch bootstrap/45321] Unbreak ARM bootstrap From: Ramana Radhakrishnan Reply-To: ramana.radhakrishnan@arm.com To: gcc-patches@gcc.gnu.org Cc: mikpe@it.uu.se, froyndnj@codesourcery.com Date: Tue, 31 Aug 2010 13:22:59 +0100 Message-Id: <1283257379.9521.8.camel@e102325-lin.cambridge.arm.com> Mime-Version: 1.0 X-IsSubscribed: yes 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 Hi, This patch attached to the bug report thanks to Mikael fixes bootstrap for ARM thanks to the changes to use stdarg_p and whether const trees are used or not. Bootstrap fixed on ARM and moves further to the next set of errors with PR45444 which I believe Mikael has a patch in the works for. Also bootstrapped and tested on x86_64. Ok to commit to trunk? cheers Ramana Mikael Pettersson PR bootstrap/45321 * gcc/tree.c (stdarg_p): Make fntype parameter const. * gcc/tree.h (stdarg_p): Likewise. (function_args_iterator): Remove unused fntype field. (function_args_iter_init): Do not initialize fntype field. Make fntype parameter const. Index: gcc/tree.c =================================================================== --- gcc/tree.c (revision 163581) +++ gcc/tree.c (working copy) @@ -10508,7 +10508,7 @@ /* Return true if TYPE has a variable argument list. */ bool -stdarg_p (tree fntype) +stdarg_p (const_tree fntype) { function_args_iterator args_iter; tree n = NULL_TREE, t; Index: gcc/tree.h =================================================================== --- gcc/tree.h (revision 163581) +++ gcc/tree.h (working copy) @@ -4767,16 +4767,14 @@ /* Iterator for going through the function arguments. */ typedef struct { - tree fntype; /* function type declaration */ tree next; /* TREE_LIST pointing to the next argument */ } function_args_iterator; /* Initialize the iterator I with arguments from function FNDECL */ static inline void -function_args_iter_init (function_args_iterator *i, tree fntype) +function_args_iter_init (function_args_iterator *i, const_tree fntype) { - i->fntype = fntype; i->next = TYPE_ARG_TYPES (fntype); } @@ -4848,7 +4846,7 @@ extern tree *call_expr_argp (tree, int); extern tree create_artificial_label (location_t); extern const char *get_name (tree); -extern bool stdarg_p (tree); +extern bool stdarg_p (const_tree); extern bool prototype_p (tree); extern bool is_typedef_decl (tree x); extern bool typedef_variant_p (tree);