https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78618
--- Comment #22 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- On Sun, Dec 04, 2016 at 06:01:29PM +0000, janus at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78618 > > --- Comment #21 from janus at gcc dot gnu.org --- > (In reply to janus from comment #20) > > So I guess one should find out where the symbol '__convert_s4_s1' obtains > > its charlen and prevent that from happening ... > > > I think that this is accomplished by the following: > > Index: gcc/fortran/intrinsic.c > =================================================================== > --- gcc/fortran/intrinsic.c (revision 243224) > +++ gcc/fortran/intrinsic.c (working copy) > @@ -5055,11 +5055,13 @@ gfc_convert_chartype (gfc_expr *expr, gfc_typespec > new_expr->value.function.name = sym->lib_name; > new_expr->value.function.isym = sym; > new_expr->where = old_where; > + new_expr->ts = *ts; > new_expr->rank = rank; > new_expr->shape = gfc_copy_shape (shape, rank); > > gfc_get_ha_sym_tree (sym->name, &new_expr->symtree); > - new_expr->symtree->n.sym->ts = *ts; > + new_expr->symtree->n.sym->ts.type = ts->type; > + new_expr->symtree->n.sym->ts.kind = ts->kind; > new_expr->symtree->n.sym->attr.flavor = FL_PROCEDURE; > new_expr->symtree->n.sym->attr.function = 1; > new_expr->symtree->n.sym->attr.elemental = 1; > > > Could someone please check if that helps? > This fixes the SIGSEGV on i686-*-freebsd. I'm starting a full regression test now. I think you found the solution!