From patchwork Fri Nov 18 13:43:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 126408 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 DD821B7212 for ; Sat, 19 Nov 2011 00:44:02 +1100 (EST) Received: (qmail 28324 invoked by alias); 18 Nov 2011 13:43:58 -0000 Received: (qmail 28309 invoked by uid 22791); 18 Nov 2011 13:43:56 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from acsinet15.oracle.com (HELO acsinet15.oracle.com) (141.146.126.227) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 18 Nov 2011 13:43:43 +0000 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by acsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id pAIDhfM3003028 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 18 Nov 2011 13:43:42 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id pAIDheBt000725 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Nov 2011 13:43:41 GMT Received: from abhmt120.oracle.com (abhmt120.oracle.com [141.146.116.72]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id pAIDhZbS024324; Fri, 18 Nov 2011 07:43:35 -0600 Received: from [192.168.1.4] (/79.51.25.53) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 18 Nov 2011 05:43:35 -0800 Message-ID: <4EC660E6.9020504@oracle.com> Date: Fri, 18 Nov 2011 14:43:02 +0100 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Jason Merrill CC: "gcc-patches@gcc.gnu.org" Subject: Re: [C++ Patch] PR 51150 References: <4EC3CFFD.6080205@oracle.com> <4EC57098.8040900@redhat.com> <4EC5740C.1060905@oracle.com> <4EC59E45.8000404@oracle.com> <4EC65AA7.4000900@redhat.com> <4EC65D56.6060206@oracle.com> <4EC65DCA.7070307@oracle.com> In-Reply-To: <4EC65DCA.7070307@oracle.com> 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 On 11/18/2011 02:29 PM, Paolo Carlini wrote: > On 11/18/2011 02:27 PM, Paolo Carlini wrote: >> On 11/18/2011 02:16 PM, Jason Merrill wrote: >>> On 11/17/2011 06:52 PM, Paolo Carlini wrote: >>>> The problem is, in all these tests, >>>> value is always a FIX_TRUNC_EXPR, which, AFAICS, is always left >>>> untouched. >>> Aha, I guess tsubst_copy_and_build needs to handle FIX_TRUNC_EXPR >>> better. >> I see. Maybe better if you handle this issue, I have very little >> clues about the right way to do that, see, in the whole cp/ I count >> only try occurrences of FIX_TRUNC_EXPR overall ;) > I meant 4, including one in error.c. You see my point. Well, unless there are hopes that something as simple as the attached is all there is to it: works for the testcase, but I haven't run the testsuite... Paolo. //////////////// Index: pt.c =================================================================== --- pt.c (revision 181474) +++ pt.c (working copy) @@ -13384,6 +13384,7 @@ tsubst_copy_and_build (tree t, case UNARY_PLUS_EXPR: /* Unary + */ case REALPART_EXPR: case IMAGPART_EXPR: + case FIX_TRUNC_EXPR: return build_x_unary_op (TREE_CODE (t), RECUR (TREE_OPERAND (t, 0)), complain); Index: call.c =================================================================== --- call.c (revision 181474) +++ call.c (working copy) @@ -5227,6 +5227,7 @@ build_new_op_1 (enum tree_code code, int flags, tr case REALPART_EXPR: case IMAGPART_EXPR: case ABS_EXPR: + case FIX_TRUNC_EXPR: return cp_build_unary_op (code, arg1, candidates != 0, complain); case ARRAY_REF: