This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/21855] array bounds checking elimination
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 10 Jan 2012 16:55:52 +0000
- Subject: [Bug java/21855] array bounds checking elimination
- Auto-submitted: auto-generated
- References: <bug-21855-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21855
--- Comment #20 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-10 16:55:52 UTC ---
(In reply to comment #19)
>
> > No. What you can do is, via the method I outlined, tell GCC that
> > args is to be treated similar to a local automatic variable - thus
> > it cannot be refered to from other functions (unless you pass them
> > its address of course).
>
> But that doesn't help. args *can* potentially be referred to by other
> functions. The special property we need to make use of its that fact that once
> an array is created, its length can never change.
That is something we cannot express at the moment, and I think it would
be hard to implement reliably (thinking of the RTX_UNCHANGING saga - we
do have to exclude the stmts that initialize the length field).