From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32499 invoked by alias); 10 May 2014 23:45:36 -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 32485 invoked by uid 89); 10 May 2014 23:45:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: qmta12.emeryville.ca.mail.comcast.net Received: from qmta12.emeryville.ca.mail.comcast.net (HELO qmta12.emeryville.ca.mail.comcast.net) (76.96.27.227) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 10 May 2014 23:45:34 +0000 Received: from omta05.emeryville.ca.mail.comcast.net ([76.96.30.43]) by qmta12.emeryville.ca.mail.comcast.net with comcast id 0PkN1o0020vp7WL01PlZmY; Sat, 10 May 2014 23:45:33 +0000 Received: from [IPv6:2601:9:5f80:ba4::1] ([IPv6:2601:9:5f80:ba4::1]) by omta05.emeryville.ca.mail.comcast.net with comcast id 0PlY1o0032nwLhK8RPlYs0; Sat, 10 May 2014 23:45:32 +0000 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: PR 61136: wide-int fallout in int_const_binop_1 From: Mike Stump In-Reply-To: <87r4411mat.fsf@talisman.default> Date: Sat, 10 May 2014 23:45:00 -0000 Cc: gcc-patches@gcc.gnu.org Content-Transfer-Encoding: quoted-printable Message-Id: <6FEE9EBD-0D0B-4033-8184-931D2B1D799D@comcast.net> References: <87r4411mat.fsf@talisman.default> To: Richard Sandiford X-IsSubscribed: yes X-SW-Source: 2014-05/txt/msg00696.txt.bz2 On May 10, 2014, at 12:11 PM, Richard Sandiford wrote: > The new conversion can't be right because it loses overflow information. > The question then is whether this function should be prepared to handle > mismatched arguments (as the pre-wide-int version effectively did, since > it did everything in double_int precision) or whether the operation > should be strictly typed. If the former then the function should be > doing the calculation in widest_int, which would make it a much more > direct analogue of the original code. If the latter then we should be > able to operate directly on arg2. I think I caused this, but I don=92t think I had a deep reason for doing it= , just trying to bring them to a common type. I think a fold person should weigh in. > I tried making int_const_binop_1 strictly typed and the only thing > that was needed to pass bootstrap was a fairly obvious-looking patch > to the Ada frontend. But there's quite a bit of fallout in the testsuite > itself (including the above). > This patch therefore uses wi:: directly. > I think this is worth doing independently of the eventual patches to fix > the type incompatibilities elsewhere. I think that seems fine. > OK to install? Ok.