2015-11-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/59910
* primary.c (gfc_match_structure_constructor): Reduce a structure
constructor in a DATA statement.
2015-11-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/59910
* gfortran.dg/pr59910.f90: New test.
From-SVN: r230580
+2015-11-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/59910
+ * primary.c (gfc_match_structure_constructor): Reduce a structure
+ constructor in a DATA statement.
+
2015-11-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/43996
return MATCH_ERROR;
}
+ /* If a structure constructor is in a DATA statement, then each entity
+ in the structure constructor must be a constant. Try to reduce the
+ expression here. */
+ if (gfc_in_match_data ())
+ gfc_reduce_init_expr (e);
+
*result = e;
return MATCH_YES;
}
+2015-11-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/59910
+ * gfortran.dg/pr59910.f90: New test.
+
2015-11-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/43996
--- /dev/null
+! { dg-do compile }
+! PR fortran/59910
+!
+program main
+ implicit none
+ type bar
+ integer :: limit(1)
+ end type
+ type (bar) :: testsuite
+ data testsuite / bar(reshape(source=[10],shape=[1])) /
+end