This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH to fix -Wrestrict ICE (PR middle-end/83463)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Marek Polacek <polacek at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Martin Sebor <msebor at redhat dot com>
- Date: Mon, 18 Dec 2017 17:44:34 +0100
- Subject: Re: PATCH to fix -Wrestrict ICE (PR middle-end/83463)
- Authentication-results: sourceware.org; auth=none
- References: <20171218151022.GL2605@redhat.com> <a2ccf61f-f8ab-32ca-bbbe-b81dbc13cafe@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Dec 18, 2017 at 09:36:46AM -0700, Jeff Law wrote:
> On 12/18/2017 08:10 AM, Marek Polacek wrote:
> > I'm not entirely up to speed with this code, but this one seemed sufficiently
> > obvious: check INTEGRAL_TYPE_P before looking at a tree's min/max value.
> > Otherwise, go with maxobjsize.
> >
> > Bootstrapped/regtested on x86_64-linux, ok for trunk?
> >
> > 2017-12-18 Marek Polacek <polacek@redhat.com>
> >
> > PR middle-end/83463
> > * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref):
> > Check if TYPE is INTEGRAL_TYPE_P before accessing its min/max
> > values.
> >
> > * gcc.dg/pr83463.c: New test.
> OK.
What about INTEGRAL_TYPE_Ps that have NULL TYPE_MIN_VALUE and/or
TYPE_MAX_VALUE? Doesn't Ada create those?
Jakub