https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72714
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-invalid-code |accepts-invalid,
| |ice-on-valid-code
--- Comment #7 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Looking at J3/18-007r1, 9.7.1.1, we have
R936 allocate-coarray-spec is [ allocate-coshape-spec-list , ] [
lower-bound-expr : ] *
R937 allocate-coshape-spec is [ lower-bound-expr : ] upper-bound-expr
and in 9.7.1.2, we have
When an ALLOCATE statement is executed for a coarray, the values of the lower
cobound and upper cobound
expressions determine the cobounds of the coarray. Subsequent redefinition or
undefinition of any entities in the
cobound expressions do not affect the cobounds. If the lower cobound is
omitted, the default value is 1. The
upper cobound shall not be less than the lower cobound.
So the line
allocate (z(2)[:3,*])
is in fact valid.
While looking at this code anyway, we should also reject
allocate (z[2:1,*])