http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46842
--- Comment #21 from Mikael Morin <mikael at gcc dot gnu.org> 2010-12-10
21:57:06 UTC ---
Does this fix tonto ?
====================
diff --git a/trans-array.c b/trans-array.c
index 52ba831..e312777 100644
--- a/trans-array.c
+++ b/trans-array.c
@@ -5442,6 +5442,10 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr,
gfc_ss * ss)
}
else if (expr->expr_type == EXPR_FUNCTION)
{
+ for (n = 0; n < info->dimen; n++)
+ if (info->dim[n] != n)
+ goto descriptor;
+
desc = info->descriptor;
se->string_length = ss->string_length;
}
@@ -5460,6 +5464,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr,
gfc_ss * ss)
tree to;
tree base;
+descriptor:
/* Set the string_length for a character array. */
if (expr->ts.type == BT_CHARACTER)
se->string_length = gfc_get_expr_charlen (expr);
====================
PS: patch is against ~ 2 months old trunk