https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128682

--- Comment #10 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Mikael Morin from comment #8)
> No, the function walks e->ref, so e is supposed to be a variable.
> The problem happens because we look at the variable through TRANSPOSE.
> In gfc_conv_expr_descriptor, all non-TRANSPOSE cases are handled by this:
> 
>   8513          else if (expr->expr_type == EXPR_FUNCTION && !transposed_dims 
> (ss))
>   8514            {
>   8515              desc = info->descriptor;
>   8516              se->string_length = ss_info->string_length;
>   8517            }
> 
> So what remains are variables, and TRANSPOSE functions.
> In the case of TRANSPOSE, the function gfc_get_expr_charlen could be called
> with gfc_get_noncopying_intrinsic_argument (expr) as argument instead of
> just expr.

Scratch that.  It's not always a good idea to do a quick analysis before going
to sleep.
Of course we don't look at a variable through TRANSPOSE, because we are
transposing a function result.

Reply via email to