https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68569
--- Comment #4 from Nicolas Koenig <koenigni at gcc dot gnu.org> --- And here is a fix for the first test case (z2a.f90), already regression tested on x86_64-pc-linux-gnu: Index: resolve.c =================================================================== --- resolve.c (revision 246743) +++ resolve.c (working copy) @@ -14947,6 +14947,12 @@ check_data_variable (gfc_data_variable *var, locus } } + if (e->ts.type == BT_CHARACTER && e->ts.u.cl->length + && e->ts.u.cl->length->expr_type == EXPR_VARIABLE) + gfc_error("Nonconstant length character at %L in DATA statement", + &e->where); + + if (e->rank == 0 || has_pointer) { mpz_init_set_ui (size, 1);