This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29489] LBOUND (array) and LBOUND (array, DIM) give different results.
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Oct 2006 09:07:07 -0000
- Subject: [Bug fortran/29489] LBOUND (array) and LBOUND (array, DIM) give different results.
- References: <bug-29489-10374@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from fxcoudert at gcc dot gnu dot org 2006-10-19 09:07 -------
So that it doesn't get lost, here's another UBOUND problem:
$ cat a.f90
subroutine foo (x,n)
integer x(7,n,2,*)
print *, ubound(x,1)
print *, ubound(x,2)
print *, ubound(x,3)
! print *, ubound(x,4)
! print *, ubound(x)
end
integer i(7,4,2,9)
call foo(i,4)
end
$ ifort a.f90 && ./a.out
7
4
2
$ gfortran a.f90 && ./a.out
In file a.f90:5
print *, ubound(x,2)
1
Error: The upper bound in the last dimension must appear in the reference to
the assumed size array 'x' at (1).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29489