[Bug fortran/38859] [4.3/4.4 Regression] ubound and lbound treat structure component references as whole arrays
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Jan 15 20:11:00 GMT 2009
------- 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
More information about the Gcc-bugs
mailing list