+2004-05-13 Paul Brook <paul@codesourcery.com>
+
+ PR fortran/15314
+ * trans-expr.c (gfc_conv_structure): Use field type, not expr type.
+
2004-05-13 Joseph S. Myers <jsm@polyomino.org.uk>
* gfortran.texi: Use @table @emph instead of @itemize @emph.
/* Evaluate the expression for this component. */
if (init)
{
- switch (c->expr->expr_type)
+ if (cm->dimension)
{
- case EXPR_ARRAY:
arraytype = TREE_TYPE (cm->backend_decl);
cse.expr = gfc_conv_array_initializer (arraytype, c->expr);
- break;
-
- case EXPR_STRUCTURE:
- gfc_conv_structure (&cse, c->expr, 1);
- break;
-
- default:
- gfc_conv_expr (&cse, c->expr);
}
+ else if (cm->ts.type == BT_DERIVED)
+ gfc_conv_structure (&cse, c->expr, 1);
+ else
+ gfc_conv_expr (&cse, c->expr);
}
else
{