re PR fortran/83522 (ICE on allocatable string reference, string(:)(:))
authorTobias Burnus <burnus@net-b.de>
Tue, 9 Oct 2018 18:03:31 +0000 (20:03 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Tue, 9 Oct 2018 18:03:31 +0000 (20:03 +0200)
commitaf2d2d135a3374fb8cbd04f027683b0cbb868d88
tree0d24ebdd84ab190810b5ef1a5f53e72b5d9a8fd9
parent6fd8679fceaed5e2ef131eafe806a6c2cd92395c
re PR fortran/83522 (ICE on allocatable string reference, string(:)(:))

2018-10-09  Tobias Burnus <burnus@net-b.de>

PR fortran/83522
* resolve.c (resolve_ref): Reject nonscalar
substring references.

        PR fortran/83522
* gfortran.dg/actual_array_substr_1.f90: Add dg-error,
change to dg-do compile.
* gfortran.dg/actual_array_substr_2.f90: Ditto.
* gfortran.dg/array_initializer_1.f90: Use array
element not size-one section.
* gfortran.dg/array_substring.f90: New.

From-SVN: r264990
gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/actual_array_substr_1.f90
gcc/testsuite/gfortran.dg/actual_array_substr_2.f90
gcc/testsuite/gfortran.dg/array_substring.f90 [new file with mode: 0644]