http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57522
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org,
| |pault at gcc dot gnu.org
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
> print *, a
produces (internal representation, -fdump-tree-original):
a.dtype = 265;
a.dim[0].lbound = 1;
a.dim[0].ubound = 4;
a.dim[0].stride = 1;
a.data = (void * restrict) &t[0].a;
_gfortran_transfer_array_write (&dt_parm.6, &a, 4, 0);
obviously, stride = 1 is wrong.
In trans_associate_var, one has:
if (sym->assoc->variable)
{
se.direct_byref = 1;
se.expr = desc;
}
gfc_conv_expr_descriptor (&se, e);
where desc == backend decl of "a" (name in the associate statement) and e ==
gfc_expr of the selector (i.e. t%a).
I have not yet completely understood why, but the call gfc_conv_expr_descriptor
yields a unit stride.