From: Richard Biener <richard.guenther@gmail.com>
To: Bernd Schmidt <bschmidt@redhat.com>
Cc: "Martin Liška" <mliska@suse.cz>, "GCC Patches" <gcc-patches@gcc.gnu.org>
Subject: Re: GCSE: Use HOST_WIDE_INT instead of int (PR, rtl-optimization/79574).
Date: Fri, 03 Mar 2017 11:04:00 -0000 [thread overview]
Message-ID: <CAFiYyc2a9c6KqyK2GfC1zTEe=HsTnNS6cpAO_-R1i_hrep8kRg@mail.gmail.com> (raw)
In-Reply-To: <920b34d5-42c9-8222-f5bb-bbd81c642f08@redhat.com>
On Thu, Mar 2, 2017 at 8:58 PM, Bernd Schmidt <bschmidt@redhat.com> wrote:
> On 03/02/2017 06:50 PM, Martin Liška wrote:
>>
>> Hello.
>>
>> This is second part of fixes needed to not trigger integer overflow in
>> gcse pass.
>
>
> So, how is this intended to work? The min/max stored in the param is an int,
> and by using a HOST_WIDE_INT here, we expect that it is a larger type and
> therefore won't overflow?
HOST_WIDE_INT is equal to uint64_t (and we could mass-replace where we can
do so consistently)
Richard.
>> {
>> expr = flat_table[i];
>> fprintf (file, "Index %d (hash value %d; max distance %d)\n ",
>> - expr->bitmap_index, hash_val[i], expr->max_distance);
>> + expr->bitmap_index, hash_val[i],
>> (int)expr->max_distance);
>> print_rtl (file, expr->expr);
>> fprintf (file, "\n");
>
>
> Use HOST_WIDE_INT_PRINT_DEC maybe? Otherwise OK, I guess.
>
>
> Bernd
prev parent reply other threads:[~2017-03-03 11:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 17:50 Martin Liška
2017-03-02 19:58 ` Bernd Schmidt
2017-03-03 10:31 ` Martin Liška
2017-03-03 11:04 ` Richard Biener [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFiYyc2a9c6KqyK2GfC1zTEe=HsTnNS6cpAO_-R1i_hrep8kRg@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=bschmidt@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=mliska@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).