------- 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

Reply via email to