[Bug fortran/30514] zero-sized array wrongly rejected: integer :: i(1:-1)
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Jan 22 22:17:00 GMT 2007
------- Comment #4 from burnus at gcc dot gnu dot org 2007-01-22 22:17 -------
> This fixes the PR but I have not yet determined if it is standard conforming
> behaviour
See 5.1.2.5.1 Explicit-shape array:
"If the upper bound is less than the lower bound, the range is empty, the
extent in that dimension is zero, and the array is of zero size."
> Usually, we need to take care of the case for negative stride, but here
> obviously it's not a problem :)
;-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30514
More information about the Gcc-bugs
mailing list