Skip to content

Commit

Permalink
Merge commit 'ff9715cd14e37146fd9b3b40be4c5f00aaa96185' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
rosecompiler committed Apr 19, 2021
2 parents 041e865 + ff9715c commit aadb6ee
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
19 changes: 19 additions & 0 deletions src/ROSETTA/Grammar/Expression.code
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,7 @@ HEADER_JOVIAL_TABLE_PRESET_EXP_END

// Rasmussen (4/9/2021): Added SgJovialPresetPositionExp to support initialization of Jovial tables
HEADER_JOVIAL_PRESET_POSITION_EXP_START
int replace_expression (SgExpression *o, SgExpression *n);
HEADER_JOVIAL_PRESET_POSITION_EXP_END

HEADER_UPC_LOCAL_SIZEOF_EXPRESSION_START
Expand Down Expand Up @@ -9482,6 +9483,24 @@ SgJovialPresetPositionExp::get_type() const
ROSE_ASSERT(p_value);
return p_value->get_type();
}

int
SgJovialPresetPositionExp::replace_expression (SgExpression *o, SgExpression *n)
{
ROSE_ASSERT(o != NULL);
ROSE_ASSERT(n != NULL);

if (p_indices == o) {
p_indices = isSgExprListExp(n);
return p_indices != nullptr;
} else if (p_value) {
p_value = n;
return 1;
} else {
printf ("Warning: inside of SgUnaryOp::replace_expression original SgExpression unidentified \n");
return 0;
}
}
SOURCE_JOVIAL_PRESET_POSITION_EXP_END


Expand Down
4 changes: 2 additions & 2 deletions src/ROSETTA/src/statement.C
Original file line number Diff line number Diff line change
Expand Up @@ -3473,9 +3473,9 @@ Grammar::setUpStatements ()
"control_kind", "= SgProcessControlStatement::e_unknown",
NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
ProcessControlStatement.setDataPrototype ( "SgExpression*", "code", "= NULL",
CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);
ProcessControlStatement.setDataPrototype ( "SgExpression*", "quiet", "= NULL",
NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, NO_TRAVERSAL, NO_DELETE);
NO_CONSTRUCTOR_PARAMETER, BUILD_ACCESS_FUNCTIONS, DEF_TRAVERSAL, NO_DELETE);

// DQ (8/14/2007): Added new data members to Fortran IR nodes.
IOStatement.setFunctionPrototype ( "HEADER_IO_STATEMENT", "../Grammar/Statement.code" );
Expand Down
9 changes: 9 additions & 0 deletions src/frontend/SageIII/sageInterface/sageInterface.C
Original file line number Diff line number Diff line change
Expand Up @@ -10949,6 +10949,15 @@ void SageInterface::replaceExpression(SgExpression* oldExp, SgExpression* newExp
} else {
ROSE_ABORT();
}
} else if (isSgProcessControlStatement(parent)) {
SgProcessControlStatement * ctrl_stmt = (SgProcessControlStatement*)parent;
if (oldExp == ctrl_stmt->get_quiet()) {
ctrl_stmt->set_quiet(newExp);
} else if (oldExp == ctrl_stmt->get_code()) {
ctrl_stmt->set_code(newExp);
} else {
ROSE_ABORT();
}
} else if (isSgFortranDo(parent)) {
SgFortranDo* fortranDo = isSgFortranDo(parent);
if (oldExp == fortranDo->get_initialization()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ALL_TESTCODES = \
$(TESTCODES_REQUIRED_TO_PASS) \
$(TESTCODE_CURRENTLY_FAILING)

ROSE_FLAGS = --edg:no_warnings -w --edg:restrict
ROSE_FLAGS = --edg:no_warnings -w --edg:restrict -std=c++14

PASSING_TEST_Objects = ${TESTCODES:.C=.o}
PASSING_TEST_Sources = ${TESTCODES:.C=.C.passed}
Expand Down

0 comments on commit aadb6ee

Please sign in to comment.