Bug 60813 - [Coarray] substrings mishandled
Summary: [Coarray] substrings mishandled
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.9.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic, rejects-valid
Depends on:
Blocks: Coarray
  Show dependency treegraph
 
Reported: 2014-04-10 21:13 UTC by Tobias Burnus
Modified: 2018-01-05 14:28 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2014-04-14 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2014-04-10 21:13:13 UTC
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
Comment 1 Dominique d'Humieres 2014-04-14 09:00:48 UTC
Confirmed on 4.7.4, 4.8.3, 4.9.0 (RC), and 4.10.