The attached patch appears to fix PR fortran/77420 without causing regressions. The problem raised by Andrew Benson at https://gcc.gnu.org/ml/fortran/2016-09/msg00039.html contained in pr77420_3.f90 and pr77420_4.f90. The original testcase from the PR is in pr77420_1.f90 and a variation on that testcase is in pr77420_2.f90. Patch has been regression tested on x86_64-*-freebsd. OK to commit? 2016-09-14 Steven G. Kargl PR fortran/77420 * trans-common.c: Handle array elements in equivalence when the lower and upper bounds of array spec are NULL. 2016-09-14 Steven G. Kargl PR fortran/77420 * gfortran.dg/pr77420_1.f90: New test. * gfortran.dg/pr77420_2.f90: Ditto. * gfortran.dg/pr77420_3.f90: New test. Requires ... * gfortran.dg/pr77420_4.f90: this file. -- Steve