This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34759] Assumed size array reference not allowed in SHAPE intrinsic, even though last subscript specified
- 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: 12 Jan 2008 21:13:54 -0000
- Subject: [Bug fortran/34759] Assumed size array reference not allowed in SHAPE intrinsic, even though last subscript specified
- References: <bug-34759-15620@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2008-01-12 21:13 -------
Confirm, though your reduced test case is invalid (the variables k and l need
to be arrays. Corrected test case:
subroutine j_assumed_size(A,N)
dimension A(10,11,12,*), k(3), l(3)
k = shape(A(:,:,:,N))
l = shape(A(:,:,:,3))
end
"SOURCE may be of any type. It may be a scalar or an array. It shall not be an
unallocated allocatable or a pointer that is not associated. It shall not be an
assumed-size array."
The shall-nots do not apply for the rank-3 arrays A(:,:,:,N) and A(:,:,:,3).
Actually, this could be a wider problem, which is not only limited to check.c's
gfc_check_shape. (For actual/dummy argument checking, I added a note to PR
34665.)
Thanks for the report.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |32834
nThis| |
Keywords| |rejects-valid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34759