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());
|
||||
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<string, vector<FuncInfo*>>& 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();
|
||||
|
||||
Reference in New Issue
Block a user