This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/2] [graphite] fix invalid bounds on array refs
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Sebastian Paul Pop <s dot pop at samsung dot com>
- Cc: Sebastian Pop <sebpop at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, hiraditya at msn dot com
- Date: Thu, 3 Dec 2015 10:50:14 +0100
- Subject: Re: [PATCH 2/2] [graphite] fix invalid bounds on array refs
- Authentication-results: sourceware.org; auth=none
- References: <1449074094-15117-1-git-send-email-s dot pop at samsung dot com> <1449074094-15117-2-git-send-email-s dot pop at samsung dot com> <26A4BFA1-EF5B-4DA1-A203-4EA3B41AC996 at gmail dot com> <005501d12d49$856b2870$90417950$ at samsung dot com>
On Wed, Dec 2, 2015 at 10:36 PM, Sebastian Paul Pop <s.pop@samsung.com> wrote:
> Do you recommend that we add a gcc_assert that min is always lower than max?
No, min can be one less than max if the array has size zero.
> The change in Graphite code can be reverted then:
>
>>+ /* Fortran has some arrays where high bound is -1 and low is 0. */
>>+ if (integer_onep (fold_build2 (LT_EXPR, boolean_type_node, high,
>>low)))
>>+ return false;
>
>
> -----Original Message-----
>
> But either that is the case or the frontend has a bug and should be fixed. So your patch doesn't make any sense.
>
> Richard.
>
>