From patchwork Wed Mar 16 10:21:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 87218 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 ECCD7B7005 for ; Wed, 16 Mar 2011 21:21:12 +1100 (EST) Received: (qmail 20692 invoked by alias); 16 Mar 2011 10:21:10 -0000 Received: (qmail 20662 invoked by uid 22791); 16 Mar 2011 10:21:09 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Mar 2011 10:21:05 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2GAL3ES031116 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 16 Mar 2011 06:21:03 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p2GAL2OX012400 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Mar 2011 06:21:03 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (localhost.localdomain [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id p2GAL2Or010533; Wed, 16 Mar 2011 11:21:02 +0100 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id p2GAL2Cn010531; Wed, 16 Mar 2011 11:21:02 +0100 Date: Wed, 16 Mar 2011 11:21:02 +0100 From: Jakub Jelinek To: Andreas Schwab Cc: Richard Henderson , Cary Coutant , Jason Merrill , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Adjustment to DW_TAG_GNU_call_site patch for ICF debug Message-ID: <20110316102102.GH30899@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <20110315112202.GY30899@tyan-ft48-01.lab.bos.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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 On Wed, Mar 16, 2011 at 11:11:07AM +0100, Andreas Schwab wrote: > Jakub Jelinek writes: > > > + { > > + int nargs = list_length (TYPE_ARG_TYPES (type)); > > + link = CALL_INSN_FUNCTION_USAGE (insn); > > ../../gcc/var-tracking.c: In function 'prepare_call_arguments': > ../../gcc/var-tracking.c:5623:12: error: unused variable 'nargs' [-Werror=unused-variable] You didn't say which target it is. Anyway, guess on your target INIT_CUMULATIVE_ARGS macro ignores the last argument. Will commit this as obvious (using list_length directly in INIT_CUMULATIVE_ARGS isn't a good choice, because some targets might evaluate it more than once): 2011-03-16 Jakub Jelinek * var-tracking.c (prepare_call_arguments): Add ATTRIBUTE_UNUSED to nargs. Jakub --- gcc/var-tracking.c.jj 2011-03-16 09:36:12.000000000 +0100 +++ gcc/var-tracking.c 2011-03-16 11:16:04.074671156 +0100 @@ -5620,7 +5620,7 @@ prepare_call_arguments (basic_block bb, type = NULL; else { - int nargs = list_length (TYPE_ARG_TYPES (type)); + int nargs ATTRIBUTE_UNUSED = list_length (TYPE_ARG_TYPES (type)); link = CALL_INSN_FUNCTION_USAGE (insn); #ifndef PCC_STATIC_STRUCT_RETURN if (aggregate_value_p (TREE_TYPE (type), type)