This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29712] New: UBOUND of non-last dimensions of assumed-size array
- 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: 4 Nov 2006 16:32:33 -0000
- Subject: [Bug fortran/29712] New: UBOUND of non-last dimensions of assumed-size array
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Coming from PR 29489, but I think it's better to keep a separate PR about it:
$ 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).
--
Summary: UBOUND of non-last dimensions of assumed-size array
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29712