+2015-04-22 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/65429
+ * decl.c (add_init_expr_to_sym): Set the length type parameter.
+
2015-04-10 Tobias Burnus <burnus@net-b.de>
* trans-stmt.c (gfc_trans_lock_unlock): Implement -fcoarray=lib
}
else if (init->expr_type == EXPR_ARRAY)
{
- gfc_constructor *c;
- c = gfc_constructor_first (init->value.constructor);
- clen = c->expr->value.character.length;
+ clen = mpz_get_si (init->ts.u.cl->length->value.integer);
sym->ts.u.cl->length
= gfc_get_int_expr (gfc_default_integer_kind,
NULL, clen);
+2015-04-22 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/65429
+ * gfortran.dg/pr65429.f90: New test.
+
2015-04-22 Yury Gribov <y.gribov@samsung.com>
* c-c++-common/asan/user-section-1.c: New test.
--- /dev/null
+! { dg-do run }
+! PR fortran/65429
+program foo
+
+ implicit none
+
+ character(*), parameter :: s(*) = [ character(5) :: 'abcde', 'fghij' ]
+ character(*), parameter :: t(*) = [ character(31) :: ]
+ character(*), parameter :: u(*) = [ 'qwerty', 'asdfgh', 'zxcvbn']
+ character(*), parameter :: v(*) = ['','']
+
+ if ((size(s) /= 2).or.(len(s)/=5)) call abort
+ if ((size(t) /= 0).or.(len(t)/=31)) call abort
+ if ((size(u) /= 3).or.(len(u)/=6)) call abort
+ if ((size(v) /= 2).or.(len(v)/=0)) call abort
+ if ((s(1)/='abcde').or.(s(2)/='fghij')) call abort
+ if ((u(1)/='qwerty').or.(u(2)/='asdfgh').or.(u(3)/='zxcvbn')) call abort
+
+end program foo