diff --git a/flang/docs/OpenACC.md b/flang/docs/OpenACC.md --- a/flang/docs/OpenACC.md +++ b/flang/docs/OpenACC.md @@ -15,3 +15,5 @@ ## Intentional deviation from the specification * The end directive for combined construct can omit the `loop` keyword. +* An `!$acc routine` with no parallelism clause is treated as if the `seq` + clause was present. diff --git a/flang/test/Semantics/OpenACC/acc-routine-validity.f90 b/flang/test/Semantics/OpenACC/acc-routine-validity.f90 --- a/flang/test/Semantics/OpenACC/acc-routine-validity.f90 +++ b/flang/test/Semantics/OpenACC/acc-routine-validity.f90 @@ -10,7 +10,6 @@ !$acc routine(fct2) vector - !ERROR: At least one of GANG, SEQ, VECTOR, WORKER clause must appear on the ROUTINE directive !$acc routine(sub3) !ERROR: ROUTINE directive without name must appear within the specification part of a subroutine or function definition, or within an interface body for a subroutine or function in an interface block @@ -23,7 +22,6 @@ subroutine sub1(a) real :: a(:) - !ERROR: At least one of GANG, SEQ, VECTOR, WORKER clause must appear on the ROUTINE directive !$acc routine end subroutine sub1 diff --git a/llvm/include/llvm/Frontend/OpenACC/ACC.td b/llvm/include/llvm/Frontend/OpenACC/ACC.td --- a/llvm/include/llvm/Frontend/OpenACC/ACC.td +++ b/llvm/include/llvm/Frontend/OpenACC/ACC.td @@ -417,9 +417,7 @@ let allowedOnceClauses = [ VersionedClause, VersionedClause, - VersionedClause - ]; - let requiredClauses = [ + VersionedClause, VersionedClause, VersionedClause, VersionedClause,