From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8832 invoked by alias); 5 May 2011 09:43:43 -0000 Received: (qmail 8822 invoked by uid 22791); 5 May 2011 09:43:43 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-ww0-f51.google.com (HELO mail-ww0-f51.google.com) (74.125.82.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 May 2011 09:43:28 +0000 Received: by wwf26 with SMTP id 26so2032774wwf.8 for ; Thu, 05 May 2011 02:43:27 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.204.205 with SMTP id fn13mr2296190wbb.10.1304588607605; Thu, 05 May 2011 02:43:27 -0700 (PDT) Received: by 10.227.20.74 with HTTP; Thu, 5 May 2011 02:43:27 -0700 (PDT) In-Reply-To: <201105051123.34184.ebotcazou@adacore.com> References: <201105041914.14958.ebotcazou@adacore.com> <201105051123.34184.ebotcazou@adacore.com> Date: Thu, 05 May 2011 09:44:00 -0000 Message-ID: Subject: Re: [google]: initialize language field for clone function struct From: Richard Guenther To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org, Xinliang David Li , Jan Hubicka Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg00392.txt.bz2 On Thu, May 5, 2011 at 11:23 AM, Eric Botcazou wrot= e: >> Sure, but that's a limitation of out SAVE_EXPR handling (given that it >> would be ok to expand the SAVE_EXPR multiple times - once per >> "instantiation context"). > > You need to expand the initializer exactly once and you need to make sure= that > this occurrence is invoked before all the others at run time. =A0Not triv= ial. But where do you expand it without the SAVE_EXPR? The same restrictions apply there. So I suppose you expand it to a function in which case there is the context where the SAVE_EXPR can be expanded exactly once. If you expand it (the "global" expr without SAVE_EXPR) in multiple function contexts then I see no difference if you have a SAVE_EXPR and expand that once per such function context. Yes, this multiple-times expanding a SAVE_EXPR might not actually work right now, but it doesn't sound like this would be not fixable (mark the original SAVE_EXPR as global, during unsharing make them local and process as usual). But maybe I'm confused and simply lack an actual testcase that shows the issue ;) Richard.