From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38955 invoked by alias); 6 Mar 2015 21:46:53 -0000 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 Received: (qmail 38935 invoked by uid 89); 6 Mar 2015 21:46:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 06 Mar 2015 21:46:52 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t26LkogS031105 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 6 Mar 2015 16:46:50 -0500 Received: from [10.10.116.41] ([10.10.116.41]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t26LknvU032566; Fri, 6 Mar 2015 16:46:49 -0500 Message-ID: <54FA2046.9090500@redhat.com> Date: Fri, 06 Mar 2015 21:46:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Aldy Hernandez , gcc-patches Subject: Re: [patch] Optimize empty class copies within a C++ return statement References: <54F8E5D3.4050607@redhat.com> <54F94715.4000208@redhat.com> <54F9D396.3000400@redhat.com> In-Reply-To: <54F9D396.3000400@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-03/txt/msg00397.txt.bz2 On 03/06/2015 11:19 AM, Aldy Hernandez wrote: > We are hitting the MODIFY_EXPR case. Indeed, _because_ we hit the > MODIFY_EXPR is that we return the uninitialized temporary. > > For example, we start with: > > return retval = TARGET_EXPR > > which becomes: > > > return D.2349 = D.2347; > > which the aforementioned MODIFY_EXPR case turns into: > > > return D.2349; But doesn't this still involve a MODIFY_EXPR, i.e. return retval = D.2349? Jason