This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [bootstrap-O3] use unsigned type for regno in df-scan
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Alexandre Oliva <aoliva at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 3 Jan 2017 19:11:36 +0100
- Subject: Re: [bootstrap-O3] use unsigned type for regno in df-scan
- Authentication-results: sourceware.org; auth=none
- References: <orr34k3e5e.fsf@lxoliva.fsfla.org> <6bd3b3fa-fe6a-6561-a64c-940ba7b0acce@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jan 03, 2017 at 11:08:05AM -0700, Jeff Law wrote:
> What if REGNO is 2147483648 (assume 32 bit host). That will get us into the
> else block in df_ref_record as it's >= FIRST_PSEUDO_REGISTER.
>
> In df_ref_create_structure, we use the same expression to compute REGNO, but
> this time it's interpreted as a signed integer, so -2147483648. That gets us
> into the path where we call TEST_HARD_REG_BIT and thus the oob array index.
>
> Right?
>
> The patch is OK. It does highlight the desire to pick the right type and
> consistently use it.
Note I think we require --disable-werror for the not so common bootstrap
configurations, only normal bootstrap and profiledbootstrap are supposed to
be --enable-werror free. At least that is my understanding of the general
preference, there are too many bootstrap options and too many different sets
of false positives. Not talking about this particular patch, just a general
comment.
Jakub