[Bug fortran/78618] ICE in gfc_check_rank, at fortran/check.c:3670
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Dec 4 18:01:00 GMT 2016
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?
More information about the Gcc-bugs
mailing list