This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/60813] New: [Coarray] substrings mishandled


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

            Bug ID: 60813
           Summary: [Coarray] substrings mishandled
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: diagnostic, rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]