diff --git a/src/Transformations/FunctionPurifying/function_purifying.cpp b/src/Transformations/FunctionPurifying/function_purifying.cpp index b7f8437..aa72813 100644 --- a/src/Transformations/FunctionPurifying/function_purifying.cpp +++ b/src/Transformations/FunctionPurifying/function_purifying.cpp @@ -289,23 +289,10 @@ void transformAssumedSizeParameters(const map>& allFun SgProcHedrStmt* proc = isSgProcHedrStmt(func->funcPointer->GetOriginal()); checkNull(proc, convertFileName(__FILE__).c_str(), __LINE__); - makeDeclaration(parNames, scope); + //makeDeclaration(parNames, scope); for (auto& newPar : parNames) - { - auto arg = new SgVarRefExp(newPar); - BIF_LL1(proc->thebif) = addToExprList(BIF_LL1(proc->thebif), arg->thellnd); - - PTR_LLND ll; - PTR_SYMB symb; - ll = giveLlSymbInDeclList(arg->thellnd); - if (ll && (symb = NODE_SYMB(ll))) - { - appendSymbToArgList(BIF_SYMB(proc->thebif), symb); - SYMB_SCOPE(symb) = proc->thebif; - } - //proc->AddArg(*new SgVarRefExp(newPar)); - } + proc->AddArg(*new SgVarRefExp(newPar)); } } } @@ -360,7 +347,12 @@ void transformAssumedSizeParameters(const map>& allFun if (parNum >= pars.size()) printInternalError(convertFileName(__FILE__).c_str(), __LINE__); - SgFunctionCallExp* call = new SgFunctionCallExp(*funcSize, *pars[parNum]); + //TODO: need to do it better + SgExpression* parArray = pars[parNum]->copyPtr(); + parArray->setLhs(NULL); + parArray->setRhs(NULL); + + SgFunctionCallExp* call = new SgFunctionCallExp(*funcSize, *parArray); last->setRhs(new SgExpression(EXPR_LIST, call)); last = last->rhs(); diff --git a/src/Utils/version.h b/src/Utils/version.h index 737af8b..7b18d84 100644 --- a/src/Utils/version.h +++ b/src/Utils/version.h @@ -1,3 +1,3 @@ #pragma once -#define VERSION_SPF "2437" +#define VERSION_SPF "2439"