From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68707 invoked by alias); 30 Nov 2015 15:37:52 -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 68697 invoked by uid 89); 30 Nov 2015 15:37:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_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; Mon, 30 Nov 2015 15:37:51 +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 (Postfix) with ESMTPS id 35D4658; Mon, 30 Nov 2015 15:37:50 +0000 (UTC) Received: from redhat.com (ovpn-204-104.brq.redhat.com [10.40.204.104]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tAUFbj6K025723 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 30 Nov 2015 10:37:48 -0500 Date: Mon, 30 Nov 2015 15:41:00 -0000 From: Marek Polacek To: Joseph Myers Cc: Richard Biener , GCC Patches , Jakub Jelinek Subject: Re: [PATCH] Add save_expr langhook (PR c/68513) Message-ID: <20151130153744.GE28072@redhat.com> References: <20151127185531.GA28072@redhat.com> <43651703-7ABE-491D-8D5B-863E921EA365@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2015-11/txt/msg03493.txt.bz2 On Sat, Nov 28, 2015 at 04:05:30PM +0000, Joseph Myers wrote: > On Sat, 28 Nov 2015, Richard Biener wrote: > > > Different approach: after the FE folds (unexpectedly?), scan the result > > for SAVE_EXPRs and if found, drop the folding. > > Or, if conversions are going to fold from language-independent code (which > is the underlying problem here - a conversion without folding would be > preferred once the fallout from that can be resolved), make the front end > fold with c_fully_fold before doing the conversion, and wrap the result of > the conversion in a C_MAYBE_CONST_EXPR with c_wrap_maybe_const in the same > way as done in other places that fold early (if either c_fully_fold > indicates it can't occur in a constant expression, or the result of > folding / conversion is not an INTEGER_CST). Unfortunately, even this doesn't seem to work :(; I'm getting leaked C_MAYBE_CONST_EXPRs e.g. when converting to (_Complex float), and a bunch of missing warnings resulting in big testsuite fallout. Marek