https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69867
--- Comment #5 from kargl at gcc dot gnu.org --- Index: decl.c =================================================================== --- decl.c (revision 237945) +++ decl.c (working copy) @@ -1912,8 +1916,10 @@ build_struct (const char *name, gfc_char if (c->initializer->expr_type == EXPR_CONSTANT) gfc_set_constant_character_len (len, c->initializer, -1); - else if (mpz_cmp (c->ts.u.cl->length->value.integer, - c->initializer->ts.u.cl->length->value.integer)) + else if (c->initializer + && c->initializer->ts.u.cl + && mpz_cmp (c->ts.u.cl->length->value.integer, + c->initializer->ts.u.cl->length->value.integer)) { gfc_constructor *ctor; ctor = gfc_constructor_first (c->initializer->value.constructor);