From patchwork Fri Mar 4 04:58:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 85369 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 D0FECB70D2 for ; Fri, 4 Mar 2011 15:59:13 +1100 (EST) Received: (qmail 24625 invoked by alias); 4 Mar 2011 04:59:10 -0000 Received: (qmail 24613 invoked by uid 22791); 4 Mar 2011 04:59:09 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Mar 2011 04:59:05 +0000 Received: by iyb26 with SMTP id 26so1785961iyb.20 for ; Thu, 03 Mar 2011 20:59:03 -0800 (PST) Received: by 10.42.150.6 with SMTP id y6mr11938icv.485.1299214743518; Thu, 03 Mar 2011 20:59:03 -0800 (PST) Received: from bubble.grove.modra.org ([115.187.252.19]) by mx.google.com with ESMTPS id wt14sm1309006icb.16.2011.03.03.20.59.01 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 03 Mar 2011 20:59:02 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id DF77F170C1FA; Fri, 4 Mar 2011 15:28:56 +1030 (CST) Date: Fri, 4 Mar 2011 15:28:56 +1030 From: Alan Modra To: Richard Guenther , gcc-patches@gcc.gnu.org Subject: Re: build_function_call and TREE_ADDRESSABLE Message-ID: <20110304045856.GY13094@bubble.grove.modra.org> Mail-Followup-To: Richard Guenther , gcc-patches@gcc.gnu.org References: <20110303143332.GJ13094@bubble.grove.modra.org> <20110303232959.GT13094@bubble.grove.modra.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110303232959.GT13094@bubble.grove.modra.org> User-Agent: Mutt/1.5.20 (2009-06-14) 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 Warn off anyone trying to do as I did, and the bit about inlines is no longer relevant. OK to apply? * tree.h (TREE_ADDRESSABLE): Note that direct calls set the flag on FUNCTION_DECLs. Index: gcc/tree.h =================================================================== --- gcc/tree.h (revision 170665) +++ gcc/tree.h (working copy) @@ -1106,8 +1106,8 @@ extern void omp_clause_range_check_faile /* In VAR_DECL, PARM_DECL and RESULT_DECL nodes, nonzero means address of this is needed. So it cannot be in a register. - In a FUNCTION_DECL, nonzero means its address is needed. - So it must be compiled even if it is an inline function. + In a FUNCTION_DECL, nonzero means its address is needed. This even + happens on a direct call, making the flag fairly useless. In CONSTRUCTOR nodes, it means object constructed must be in memory. In LABEL_DECL nodes, it means a goto for this label has been seen from a place outside all binding contours that restore stack levels.