From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31603 invoked by alias); 21 Jun 2012 15:54:15 -0000 Received: (qmail 31589 invoked by uid 22791); 21 Jun 2012 15:54:13 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 21 Jun 2012 15:54:00 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id DB2A19FB23; Thu, 21 Jun 2012 17:53:59 +0200 (CEST) Date: Thu, 21 Jun 2012 16:41:00 -0000 From: Michael Matz To: Richard Guenther Cc: Xinliang David Li , Jason Merrill , GCC Patches Subject: Re: New option to turn off stack reuse for temporaries In-Reply-To: Message-ID: References: <4FE26AFC.3000703@redhat.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII Content-ID: 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: 2012-06/txt/msg01419.txt.bz2 Hi, On Thu, 21 Jun 2012, Richard Guenther wrote: > The flag is not restricted to the C++ compiler and applies to all > automatic variables. The use of that flag in the gimplifier (->in_cleanup_expr) makes it actually c++ specific. > Also even with this flag there is no guarantee we cannot figure out > lifetime in other ways, for example if the temporary gets promoted to a > register. Also with this patch you remove code motion barriers which > might cause other issues. > > A more "proper" place to fix this is when we actually do the stack > reuse, in cfgexpand. That is true, though. It would then also enable debugging help for pointers to things that go out-of-scope. Ciao, Michael.