https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60813

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|rejects-valid               |

--- Comment #2 from anlauf at gcc dot gnu.org ---
(In reply to Tobias Burnus from comment #0)
> The following substring reference gives the bogus:
> 
>    Error: Rank mismatch in array reference at (1) (1/0)
> 
> character(len=5), save :: str[*]
> print *, str(j:j)
> end

This works on 15-trunk, likely one of Andre's patches.
Removing 'rejects-valid'.

> 
> While the following (array section) is rejected - but with the wrong error
> message. It should state that "str" is a scalar. (Correct syntax for a
> substring would be "str[1](j:j)".)
> 
> character(len=5), save :: str[*]
> print *, str(j:j)[1]
> end

This one now gives a syntax error instead of a rank mismatch.

We could give a better error message here.

Reply via email to