[OPENMP50]Allow use of array shaping expression in a list.

Need to allow arrayshaping expression in a list of expressions, so use
ParseAssignmentExpression() when try to parse the base of the shaping
operation.
This commit is contained in:
Alexey Bataev 2020-03-31 16:53:00 -04:00
parent 1c0dd57cd3
commit 9b3bf72a0d
2 changed files with 3 additions and 3 deletions

View File

@ -3001,7 +3001,7 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr,
// Match the ')'.
T.consumeClose();
RParenLoc = T.getCloseLocation();
Result = Actions.CorrectDelayedTyposInExpr(ParseExpression());
Result = Actions.CorrectDelayedTyposInExpr(ParseAssignmentExpression());
if (ErrorFound) {
Result = ExprError();
} else if (!Result.isInvalid()) {

View File

@ -164,8 +164,8 @@ int main(int argc, char **argv) {
#pragma omp threadprivate(a)
Enum ee;
// CHECK: Enum ee;
#pragma omp task untied mergeable depend(out:argv[:a][1], (arr)[0:],([argc][10])argv) if(task: argc > 0) priority(f) depend(depobj:y)
// CHECK-NEXT: #pragma omp task untied mergeable depend(out : argv[:a][1],(arr)[0:],([argc][10])argv) if(task: argc > 0) priority(f) depend(depobj : y)
#pragma omp task untied mergeable depend(out:argv[:a][1], (arr)[0:],([argc][10])argv,b) if(task: argc > 0) priority(f) depend(depobj:y)
// CHECK-NEXT: #pragma omp task untied mergeable depend(out : argv[:a][1],(arr)[0:],([argc][10])argv,b) if(task: argc > 0) priority(f) depend(depobj : y)
a = 2;
// CHECK-NEXT: a = 2;
#pragma omp taskgroup task_reduction(min: arr1)