fixed analysis of arrays with type character in function parameters

This commit is contained in:
ALEXks
2026-04-10 20:09:50 +03:00
parent 3378ae5fbd
commit 2d25a61ee7
2 changed files with 4 additions and 4 deletions

View File

@@ -723,7 +723,7 @@ static void fillIn(FuncInfo *currF, SgExpression *ex, const map<string, int> &pa
{ {
if (ex) if (ex)
{ {
if (!isInFuncPar && (ex->variant() == VAR_REF || isArrayRef(ex))) if (!isInFuncPar && (ex->variant() == VAR_REF || ex->variant() == ARRAY_REF))
{ {
const char *name = ex->symbol()->identifier(); const char *name = ex->symbol()->identifier();
if (name && name != string("")) if (name && name != string(""))
@@ -880,7 +880,7 @@ static void fillInOut(FuncInfo *currF, SgStatement *start, SgStatement *last, co
for (auto ex = read->itemList(); ex; ex = ex->rhs()) for (auto ex = read->itemList(); ex; ex = ex->rhs())
{ {
SgExpression* item = ex->lhs(); SgExpression* item = ex->lhs();
if (item->variant() == VAR_REF || isArrayRef(item)) if (item && (item->variant() == VAR_REF || item->variant() == ARRAY_REF))
{ {
string symb = ""; string symb = "";
if (item->symbol()) if (item->symbol())
@@ -901,7 +901,7 @@ static void fillInOut(FuncInfo *currF, SgStatement *start, SgStatement *last, co
if (item->rhs()) if (item->rhs())
queue.push(item->rhs()); queue.push(item->rhs());
if (item->variant() == VAR_REF || isArrayRef(item)) if (item->variant() == VAR_REF || item->variant() == ARRAY_REF)
{ {
string symb = ""; string symb = "";
if (item->symbol()) if (item->symbol())

View File

@@ -1,3 +1,3 @@
#pragma once #pragma once
#define VERSION_SPF "2474" #define VERSION_SPF "2475"