The section from the standard in comment #2 is being misinterpreted.
R609 and R610 concern substrings in the context of section 6.4, which
concerns SCALARS!
Section 6.5 concerns arrays and you will find there:
R618 array-section is data-ref [ ( substring-range ) ] or
complex-part-designator
Another data point: I tried some of the testcases with IBM XL Fortran
compiler and it didn't complain or fail. I have no idea if this
behavior is an IBM extension or how other Fortran compilers behave.
GNU Fortran probably should be compatible with other Fortran
compilers, even if the behavior
Apparently this change also breaks CPU SPEC (465.tonto?).
Is this really a correct change? Even if the testcases really are
wrong, it seems that this change is going to break a lot of code in
the wild. This seems like a very bad choice, even if it pedantically
is correct.
Thanks, David
On
This seems to have caused errors in the testsuite. I guess that the
problem is that the testcases are invalid :-(
>From David Edelsohn:
Error: Substring reference of nonscalar not permitted at (1)
arrayio_11.f90
arrayio_12.f90
associate_23.f90
data_char_1.f90
deferred_character_2.f90
Hi Tobias,
nice to hear from you again!
Build and regtested on x86_64-linux.
OK for the trunk?
OK. Thanks for the patch!
Regards
Thomas