fixed routine convertation
This commit is contained in:
@@ -1476,7 +1476,7 @@ void convertExpr(SgExpression *expr, SgExpression* &retExp)
|
|||||||
retExp->setLhs(expr->lhs());
|
retExp->setLhs(expr->lhs());
|
||||||
retExp->setRhs(expr->rhs());
|
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);
|
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)
|
if (unSupportedVars.size() != 0)
|
||||||
@@ -3302,6 +3302,19 @@ SgStatement* Translate_Fortran_To_C(SgStatement *Stmt, bool isSapforConv)
|
|||||||
return converted.first;
|
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*> > ©Block, int countOfCopy)
|
void Translate_Fortran_To_C(SgStatement *firstStmt, SgStatement *lastStmt, vector<stack<SgStatement*> > ©Block, int countOfCopy)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -379,10 +379,10 @@ SgStatement *InsertProcedureCopy(SgStatement *st_header, SgSymbol *sproc, int is
|
|||||||
}
|
}
|
||||||
|
|
||||||
swapDimentionsInprivateList();
|
swapDimentionsInprivateList();
|
||||||
std::vector < std::stack < SgStatement*> > zero = std::vector < std::stack < SgStatement*> >(0);
|
//std::vector < std::stack < SgStatement*> > zero = std::vector < std::stack < SgStatement*> >(0);
|
||||||
cur_func = after;
|
//cur_func = after;
|
||||||
Translate_Fortran_To_C(new_header, end_st, zero, 0); //TranslateProcedure_Fortran_To_C(after->lexNext());
|
Translate_Fortran_To_C(new_header, end_st, 0, st_header); //TranslateProcedure_Fortran_To_C(after->lexNext());
|
||||||
|
cur_func = after;
|
||||||
if (sproc->variant() == FUNCTION_NAME)
|
if (sproc->variant() == FUNCTION_NAME)
|
||||||
{
|
{
|
||||||
new_header->insertStmtAfter(*Declaration_Statement(new_sproc), *new_header);
|
new_header->insertStmtAfter(*Declaration_Statement(new_sproc), *new_header);
|
||||||
|
|||||||
@@ -2113,6 +2113,7 @@ char *Check_Correct_Name(const char *name);
|
|||||||
char *Check_Correct_Name(const char *name);
|
char *Check_Correct_Name(const char *name);
|
||||||
|
|
||||||
/* acc_f2c.cpp */
|
/* acc_f2c.cpp */
|
||||||
|
void Translate_Fortran_To_C(SgStatement *stat, SgStatement *last, std::vector <std::stack <SgStatement*> > &, int);
|
||||||
void Translate_Fortran_To_C(SgStatement *stat, SgStatement *last, int countOfCopy, SgStatement *st_header);
|
void Translate_Fortran_To_C(SgStatement *stat, SgStatement *last, int countOfCopy, SgStatement *st_header);
|
||||||
SgStatement* Translate_Fortran_To_C(SgStatement* Stmt, bool isSapforConv = false);
|
SgStatement* Translate_Fortran_To_C(SgStatement* Stmt, bool isSapforConv = false);
|
||||||
SgSymbol* createNewFunctionSymbol(const char *name);
|
SgSymbol* createNewFunctionSymbol(const char *name);
|
||||||
|
|||||||
Reference in New Issue
Block a user