fixed routine convertation

This commit is contained in:
ALEXks
2025-01-12 15:58:18 +03:00
parent b0df33e926
commit 631a73ddc0
3 changed files with 19 additions and 5 deletions

View File

@@ -1476,7 +1476,7 @@ void convertExpr(SgExpression *expr, SgExpression* &retExp)
retExp->setLhs(expr->lhs());
retExp->setRhs(expr->rhs());
if (isUserFunction(tmpF->funName()) == 0)
if (isUserFunction(tmpF->funName()) == 0 && !inter)
{
printf(" [EXPR ERROR: %s, line %d, user line %d] unsupported variant of func call with name \"%s\"\n", __FILE__, __LINE__, first_do_par->lineNumber(), name);
if (unSupportedVars.size() != 0)
@@ -3302,6 +3302,19 @@ SgStatement* Translate_Fortran_To_C(SgStatement *Stmt, bool isSapforConv)
return converted.first;
}
void Translate_Fortran_To_C(SgStatement *firstStmt, SgStatement *lastStmt, int countOfCopy, SgStatement *st_header)
{ // entry for translating copy of the procedure called from Cuda-kernel
first_do_par = st_header;
SgStatement *save_st = cur_func;
cur_func = st_header;
std::vector < std::stack < SgStatement*> > zero = std::vector < std::stack < SgStatement*> >(0);
Translate_Fortran_To_C(firstStmt, lastStmt, zero, countOfCopy);
first_do_par = NULL;
cur_func = save_st;
return;
}
void Translate_Fortran_To_C(SgStatement *firstStmt, SgStatement *lastStmt, vector<stack<SgStatement*> > &copyBlock, int countOfCopy)
{