+2017-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
+
+ PR fortran/79335
+ * trans-array.c (duplicate_allocatable_coarray): Ensure attributes
+ passed are properly initialized.
+ (structure_alloc_comps): Same.
+ * trans-expr.c (gfc_trans_structure_assign): Same.
+
2017-02-13 Jakub Jelinek <jakub@redhat.com>
* trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.
tree dummy_desc;
gfc_init_se (&se, NULL);
+ gfc_clear_attr (&attr);
+ attr.allocatable = 1;
dummy_desc = gfc_conv_scalar_to_descriptor (&se, dest, attr);
gfc_add_block_to_block (&globalblock, &se.pre);
size = TYPE_SIZE_UNIT (TREE_TYPE (type));
else
{
gfc_se se;
- symbol_attribute attr;
gfc_init_se (&se, NULL);
- gfc_clear_attr (&attr);
token = fold_build3_loc (input_location, COMPONENT_REF,
pvoid_type_node, decl, c->caf_token,
NULL_TREE);
- comp = gfc_conv_scalar_to_descriptor (&se, comp, attr);
+ comp = gfc_conv_scalar_to_descriptor (&se, comp,
+ c->ts.type == BT_CLASS
+ ? CLASS_DATA (c)->attr
+ : c->attr);
gfc_add_block_to_block (&fnblock, &se.pre);
}
&& (!c->expr || c->expr->expr_type == EXPR_NULL))
{
tree token, desc, size;
- symbol_attribute attr;
bool is_array = cm->ts.type == BT_CLASS
? CLASS_DATA (cm)->attr.dimension : cm->attr.dimension;
}
else
{
- desc = gfc_conv_scalar_to_descriptor (&se, field, attr);
+ desc = gfc_conv_scalar_to_descriptor (&se, field,
+ cm->ts.type == BT_CLASS
+ ? CLASS_DATA (cm)->attr
+ : cm->attr);
size = TYPE_SIZE_UNIT (TREE_TYPE (field));
}
gfc_add_block_to_block (&block, &se.pre);