This is the mail archive of the
mailing list for the GCC project.
Re: PR 61136: wide-int fallout in int_const_binop_1
- From: Mike Stump <mikestump at comcast dot net>
- To: Richard Sandiford <rdsandiford at googlemail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 10 May 2014 16:45:24 -0700
- Subject: Re: PR 61136: wide-int fallout in int_const_binop_1
- Authentication-results: sourceware.org; auth=none
- References: <87r4411mat dot fsf at talisman dot default>
On May 10, 2014, at 12:11 PM, Richard Sandiford <firstname.lastname@example.org> 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’t 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?