This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] correct MEM_REF bounds checking of arrays (PR 91584)
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 30 Aug 2019 09:28:36 +0200
- Subject: Re: [PATCH] correct MEM_REF bounds checking of arrays (PR 91584)
- References: <339ecf17-c049-9c45-4ea2-26153f804bf4@gmail.com>
On Fri, Aug 30, 2019 at 12:36 AM Martin Sebor <msebor@gmail.com> wrote:
>
> The -Warray-bounds enhancement I added to GCC 9 causes false
> positives in languages like Fortran whose first array element
> is at a non-zero index. The attached patch has the function
> responsible for the warning normalize the array bounds to
> always start at zero to avoid these false positives.
>
> Tested on x86_64-linux.
OK.
Thanks,
Richard.
> Martin