https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83184
--- Comment #3 from Fritz Reese <foreese at gcc dot gnu.org> --- Author: foreese Date: Mon Jul 16 18:24:50 2018 New Revision: 262744 URL: https://gcc.gnu.org/viewcvs?rev=262744&root=gcc&view=rev Log: 2018-07-16 Fritz Reese <fritzore...@gmail.com> Fix handling of invalid assumed-shape/size arrays in legacy initializer lists. gcc/fortran/ChangeLog: PR fortran/83184 * decl.c (match_old_style_init): Initialize locus of variable expr when creating a data variable. (match_clist_expr): Verify array is explicit shape/size before attempting to allocate constant array constructor. gcc/testsuite/ChangeLog: PR fortran/83184 * gfortran.dg/assumed_rank_14.f90: New testcase. * gfortran.dg/assumed_rank_15.f90: New testcase. * gfortran.dg/dec_structure_8.f90: Update error messages. * gfortran.dg/dec_structure_23.f90: Update error messages. Added: trunk/gcc/testsuite/gfortran.dg/assumed_rank_14.f90 trunk/gcc/testsuite/gfortran.dg/assumed_rank_15.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/decl.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/dec_structure_23.f90 trunk/gcc/testsuite/gfortran.dg/dec_structure_8.f90