@@ -5374,7 +5374,6 @@ PREFIX (send_by_ref) (caf_token_t token, int image_index,
5374
5374
bool extent_mismatch = false;
5375
5375
/* Set when the first non-scalar array reference is encountered. */
5376
5376
bool in_array_ref = false;
5377
- bool array_extent_fixed = false;
5378
5377
/* Set when remote data is to be accessed through the global dynamic window. */
5379
5378
bool access_data_through_global_win = false;
5380
5379
/* Set when the remote descriptor is to accessed through the global window. */
@@ -5574,6 +5573,7 @@ PREFIX (send_by_ref) (caf_token_t token, int image_index,
5574
5573
/* Do further checks, when the source is not scalar. */
5575
5574
else if (delta != 1 )
5576
5575
{
5576
+ in_array_ref = true;
5577
5577
/* When the realloc is required, then no extent may have
5578
5578
been set. */
5579
5579
extent_mismatch = GFC_DESCRIPTOR_EXTENT (dst ,
@@ -5615,10 +5615,7 @@ PREFIX (send_by_ref) (caf_token_t token, int image_index,
5615
5615
size *= (ptrdiff_t )delta ;
5616
5616
}
5617
5617
if (in_array_ref )
5618
- {
5619
- array_extent_fixed = true;
5620
- in_array_ref = false;
5621
- }
5618
+ in_array_ref = false;
5622
5619
break ;
5623
5620
case CAF_REF_STATIC_ARRAY :
5624
5621
for (i = 0 ; riter -> u .a .mode [i ] != CAF_ARR_REF_NONE ; ++ i )
@@ -5701,6 +5698,7 @@ PREFIX (send_by_ref) (caf_token_t token, int image_index,
5701
5698
/* Do further checks, when the source is not scalar. */
5702
5699
else if (delta != 1 )
5703
5700
{
5701
+ in_array_ref = true;
5704
5702
/* When the realloc is required, then no extent may have
5705
5703
been set. */
5706
5704
extent_mismatch = GFC_DESCRIPTOR_EXTENT (dst ,
@@ -5721,10 +5719,7 @@ PREFIX (send_by_ref) (caf_token_t token, int image_index,
5721
5719
size *= (ptrdiff_t )delta ;
5722
5720
}
5723
5721
if (in_array_ref )
5724
- {
5725
- array_extent_fixed = true;
5726
- in_array_ref = false;
5727
- }
5722
+ in_array_ref = false;
5728
5723
break ;
5729
5724
default :
5730
5725
caf_runtime_error (unknownreftype , stat , NULL , 0 );
0 commit comments