Correction régression unlimited_polymorphic_5.f90

This commit is contained in:
Mikael Morin 2025-10-13 15:19:11 +02:00
parent b5524e9ec4
commit afbf79466b
1 changed files with 5 additions and 1 deletions

View File

@ -13339,7 +13339,11 @@ conv_intrinsic_move_alloc (gfc_code *code)
}
/* Copy the array descriptor data. */
gfc_add_modify_loc (input_location, &block, to_se.expr, from_se.expr);
if (GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (to_se.expr))
&& GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (from_se.expr)))
gfc_copy_descriptor (&block, to_se.expr, from_se.expr);
else
gfc_add_modify_loc (input_location, &block, to_se.expr, from_se.expr);
/* Set "from" to NULL. */
tmp = gfc_conv_descriptor_data_get (from_se.expr);