Fortran: fix checking of coshape specification in ALLOCATE statement
authorHarald Anlauf <anlauf@gmx.de>
Wed, 6 Apr 2022 20:24:21 +0000 (22:24 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Sun, 10 Apr 2022 18:20:53 +0000 (20:20 +0200)
commit54c5e064cc3dc3c9b3dff12b6d48dc3efd482b07
tree6633aa668db2ca970144b7d217ffc6f045b1aac1
parent71cac7de8f1285307f921908a43fd864baa543f9
Fortran: fix checking of coshape specification in ALLOCATE statement

gcc/fortran/ChangeLog:

PR fortran/105184
* array.cc (match_subscript): Reject assumed size coarray
specification with missing lower bound.
* resolve.cc (resolve_allocate_expr): Fix logic for checking
allocate-coshape-spec in ALLOCATE statement.

gcc/testsuite/ChangeLog:

PR fortran/105184
* gfortran.dg/coarray_44.f90: Adjust expected output.
* gfortran.dg/coarray_allocate_11.f90: Likewise.
* gfortran.dg/coarray_allocate_12.f90: New test.
gcc/fortran/array.cc
gcc/fortran/resolve.cc
gcc/testsuite/gfortran.dg/coarray_44.f90
gcc/testsuite/gfortran.dg/coarray_allocate_11.f90
gcc/testsuite/gfortran.dg/coarray_allocate_12.f90 [new file with mode: 0644]