fixed transformation
This commit is contained in:
@@ -289,23 +289,10 @@ void transformAssumedSizeParameters(const map<string, vector<FuncInfo*>>& allFun
|
|||||||
SgProcHedrStmt* proc = isSgProcHedrStmt(func->funcPointer->GetOriginal());
|
SgProcHedrStmt* proc = isSgProcHedrStmt(func->funcPointer->GetOriginal());
|
||||||
checkNull(proc, convertFileName(__FILE__).c_str(), __LINE__);
|
checkNull(proc, convertFileName(__FILE__).c_str(), __LINE__);
|
||||||
|
|
||||||
makeDeclaration(parNames, scope);
|
//makeDeclaration(parNames, scope);
|
||||||
|
|
||||||
for (auto& newPar : parNames)
|
for (auto& newPar : parNames)
|
||||||
{
|
proc->AddArg(*new SgVarRefExp(newPar));
|
||||||
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));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -360,7 +347,12 @@ void transformAssumedSizeParameters(const map<string, vector<FuncInfo*>>& allFun
|
|||||||
if (parNum >= pars.size())
|
if (parNum >= pars.size())
|
||||||
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
|
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->setRhs(new SgExpression(EXPR_LIST, call));
|
||||||
last = last->rhs();
|
last = last->rhs();
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION_SPF "2437"
|
#define VERSION_SPF "2439"
|
||||||
|
|||||||
Reference in New Issue
Block a user