REMOVE_DIST_ARRAYS_FROM_IO Handle assumed-size and assumed-shape arrays #64
@@ -17,19 +17,6 @@ using std::pair;
|
||||
|
||||
#define DEBUG_TRACE 0
|
||||
|
||||
static SgStatement* getDeclStatement(int line_num)
|
||||
{
|
||||
PTR_BFND node = current_file->firstStatement()->thebif;
|
||||
for (; node; node = node->thread)
|
||||
{
|
||||
SgStatement *st = BfndMapping(node);
|
||||
if (st->lineNumber() == line_num && isSgDeclarationStatement(st))
|
||||
return st;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static SgExpression* findExprWithVariant(SgExpression* exp, int variant)
|
||||
{
|
||||
if (exp)
|
||||
@@ -134,7 +121,7 @@ static bool checkAssumedSize(const string &array_name, DIST::Array* array_p, con
|
||||
if (!switchToDeclarationFile(array_p, decl_place, current_file_name, current_func))
|
||||
return true;
|
||||
|
||||
auto *st = getDeclStatement(decl_place.second);
|
||||
auto *st = SgStatement::getStatementByFileAndLine(decl_place.first, decl_place.second);
|
||||
|
||||
if (!st)
|
||||
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
|
||||
@@ -666,7 +653,8 @@ void replaceDistributedArraysInIO(vector<ParallelRegion*>& regions,
|
||||
|
||||
|
||||
// original declaration statement
|
||||
auto* decl_stmt = getDeclStatement(decl_place.second);
|
||||
auto *decl_stmt = SgStatement::getStatementByFileAndLine(decl_place.first, decl_place.second);
|
||||
|
||||
if (!decl_stmt || !isSgDeclarationStatement(decl_stmt))
|
||||
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user