fixed findArrayRef in loop_graph

This commit is contained in:
ALEXks
2025-06-14 12:20:34 +03:00
parent a0704038db
commit 10636427ed
3 changed files with 4 additions and 2 deletions

View File

@@ -520,7 +520,7 @@ static void findArrayRef(SgExpression *exp, bool isWirte, set<DIST::Array*>& use
{
if (exp)
{
if (exp->variant() == ARRAY_REF)
if (isArrayRef(exp))
{
DIST::Array *arrayRef = NULL;
SgSymbol *symbS = OriginalSymbol(exp->symbol());

View File

@@ -3219,12 +3219,14 @@ bool isArrayRef(SgExpression* ex)
{
SgArrayRefExp* arrayRef = isSgArrayRefExp(ex);
if (arrayRef)
{
if (isArrayType(ex->symbol()->type()))
{
auto type = isSgArrayType(ex->symbol()->type());
if (type && type->dimension())
return true;
}
}
}
return false;
}

View File

@@ -1,3 +1,3 @@
#pragma once
#define VERSION_SPF "2425"
#define VERSION_SPF "2426"