fortran: ICE equivalence with an element of an array PR94030
authorMark Eggleston <markeggleston@gcc.gnu.org>
Thu, 2 Apr 2020 06:18:52 +0000 (07:18 +0100)
committerMark Eggleston <markeggleston@gcc.gnu.org>
Thu, 2 Apr 2020 06:18:52 +0000 (07:18 +0100)
commitbf1f6d8819ade074271df718f01fd3a5a9dc1b82
treeda80262a122d9ff118c64fbc693ce5cd75223ffe
parent25839b6af9f10b3227719db35b9e9e38320341e7
fortran: ICE equivalence with an element of an array PR94030

Deferred size arrays can not be used in equivalance statements.

gcc/fortran/ChangeLog:

PR fortran/94030
* resolve.c (resolve_equivalence): Correct formatting
around the label "identical_types".  Instead of using
gfc_resolve_array_spec use is_non_constants_shape_array
to determine whether the array can be used in a in an
equivalence statement.

gcc/testsuite/ChangeLog:

PR fortran/94030
* gfortran.dg/pr94030_1.f90
* gfortran.dg/pr94030_2.f90
gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr94030_1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr94030_2.f90 [new file with mode: 0644]