This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/38859] [4.3/4.4 Regression] ubound and lbound treat structure component references as whole arrays
- 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: 15 Jan 2009 20:10:59 -0000
- Subject: [Bug fortran/38859] [4.3/4.4 Regression] ubound and lbound treat structure component references as whole arrays
- References: <bug-38859-15620@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from burnus at gcc dot gnu dot org 2009-01-15 20:10 -------
ida = lbound(a%i)
if (any(ida /= (/1,1/))) print *, 'lbound ', ida
Here, gfortran prints:
lbound 0 2
Correct would be
lbound 1 1
ida = ubound(a)
>>>>>>>>>>>>>>>>>>>^^^
Here a "%i" is missing otherwise the following line does not make sense:
if (any(ida /= (/6,7/))) print *, 'ubound ', ida
For ubound(a) the result should be "5 8" which is also gfortran's result.
For ubound(a%i):
gfortran: 5 8
correct: 6 7
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38859