REMOVE_DIST_ARRAYS_FROM_IO: use isArrayRef #62

Merged
Alexander_KS merged 1 commits from replace_io_arrays into master 2025-06-14 18:06:19 +00:00

View File

@@ -136,7 +136,8 @@ static void replaceArrayRec(SgSymbol* arr, SgSymbol* replace_by, SgExpression* e
if (!exp)
return;
if (exp->symbol() && exp->symbol()->identifier() && strcmp(exp->symbol()->identifier(), arr->identifier()) == 0)
if (isArrayRef(exp) &&
strcmp(exp->symbol()->identifier(), arr->identifier()) == 0)
{
has_read |= from_read;
has_write |= from_write;