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