2017-04-14 Dominique d'Humieres <dominiq@lps.ens.fr>
Backport from trunk
2015-11-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/59910
PR fortran/80388
* primary.c (gfc_match_structure_constructor): Reduce a structure
constructor in a DATA statement.
* gfortran.dg/pr59910.f90: New test.
From-SVN: r246929
+2017-04-14 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ Backport from trunk
+ 2015-11-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/59910
+ PR fortran/80388
+ * primary.c (gfc_match_structure_constructor): Reduce a structure
+ constructor in a DATA statement.
+
2017-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
* trans-types.c (gfc_get_int_kind_from_width_isofortranen): Choose
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;
}
+2017-04-14 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ Backport from trunk
+ 2015-11-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/59910
+ PR fortran/80388
+ * gfortran.dg/pr59910.f90: New test.
+
2017-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from GCC 6
--- /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