This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34741] Bounds-check of array-pointer == [ constructor ]
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jan 2008 18:01:21 -0000
- Subject: [Bug fortran/34741] Bounds-check of array-pointer == [ constructor ]
- References: <bug-34741-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2008-01-12 18:01 -------
gfortran does only create a check for ptr itself and not for ptr <->
constructor; the created check looks (with some temporary variables added) as
follows:
if (prt.lbound < ptr.lbound || ptr.lbound > ptr.ubound)
(It were be also great if this would not be written by gfortran as it is rather
useless; though the middle end will remove it using -O.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34741