This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/37861] Bogus array bounds warning
- From: "jamborm at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2008 18:01:29 -0000
- Subject: [Bug middle-end/37861] Bogus array bounds warning
- References: <bug-37861-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jamborm at gcc dot gnu dot org 2008-10-31 18:01 -------
(In reply to comment #2)
> So what is this? Is the warning logic wrong or is the IR wrong? It seems to me
> that IR is valid.
>
Well, it probabaly isn't. I guess the second index should not ever
exceed its upper bound (100 in these test cases) and it blatantly
does. The proper solution (again, as suggested by Richi today)
therefore most probabaly is "not to re-create ARRAY_REF for
multi-dimensional arrays" at some place in folding.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37861