2019-02-04 Harald Anlauf <anlauf@gmx.de>
PR fortran/89077
* gfortran.dg/pr89077.f90: New test.
2019-02-04 Harald Anlauf <anlauf@gmx.de>
PR fortran/89077
* gfortran.dg/pr89077.f90: New test.
From-SVN: r268525
+2019-02-04 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/89077
+ * decl.c (add_init_expr_to_sym): Copy length of string initializer
+ to declared symbol.
+
2019-02-04 Martin Liska <mliska@suse.cz>
PR fortran/89185
}
else if (init->ts.u.cl && init->ts.u.cl->length)
sym->ts.u.cl->length =
- gfc_copy_expr (sym->value->ts.u.cl->length);
+ gfc_copy_expr (init->ts.u.cl->length);
}
}
/* Update initializer character length according symbol. */
+2019-02-04 Harald Anlauf <anlauf@gmx.de>
+
+ PR fortran/89077
+ * gfortran.dg/pr89077.f90: New test.
+
2019-02-04 Martin Liska <mliska@suse.cz>
PR ipa/88985
--- /dev/null
+! { dg-do run }
+!
+! PR fortran/89077 - ICE using * as len specifier for character parameter
+
+program test
+ implicit none
+ integer :: i
+ character(*), parameter :: s = 'abcdef'
+ character(*), parameter :: t = transfer ([(s(i:i), i=1,len(s))], s)
+ if (len (t) /= len (s) .or. t /= s) stop 1
+end