[clang] bb97c99 - [OpenACC] Enable serial/kernels Compute Constructs

via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 4 12:47:22 PST 2024


Author: erichkeane
Date: 2024-03-04T12:47:18-08:00
New Revision: bb97c992834a24632629dec4ec79ea7ffd1261fa

URL: https://github.com/llvm/llvm-project/commit/bb97c992834a24632629dec4ec79ea7ffd1261fa
DIFF: https://github.com/llvm/llvm-project/commit/bb97c992834a24632629dec4ec79ea7ffd1261fa.diff

LOG: [OpenACC] Enable serial/kernels Compute Constructs

So far, all the work we've done for compute constructs has only used
'parallel'.  This patch does the work to enable the same logic for
'serial' and 'kernels' constructs as well, since they are the same
semantic behavior.

Added: 
    

Modified: 
    clang/lib/Parse/ParseOpenACC.cpp
    clang/lib/Sema/SemaOpenACC.cpp
    clang/test/ParserOpenACC/parse-clauses.c
    clang/test/ParserOpenACC/parse-constructs.c
    clang/test/SemaOpenACC/compute-construct-ast.cpp
    clang/test/SemaOpenACC/no-branch-in-out.c
    clang/test/SemaOpenACC/no-branch-in-out.cpp
    clang/test/SemaOpenACC/parallel-assoc-stmt-inst.cpp
    clang/test/SemaOpenACC/parallel-loc-and-stmt.c

Removed: 
    


################################################################################
diff  --git a/clang/lib/Parse/ParseOpenACC.cpp b/clang/lib/Parse/ParseOpenACC.cpp
index 4946a61fca007f..50e3c39f60919b 100644
--- a/clang/lib/Parse/ParseOpenACC.cpp
+++ b/clang/lib/Parse/ParseOpenACC.cpp
@@ -555,6 +555,8 @@ bool doesDirectiveHaveAssociatedStmt(OpenACCDirectiveKind DirKind) {
   default:
     return false;
   case OpenACCDirectiveKind::Parallel:
+  case OpenACCDirectiveKind::Serial:
+  case OpenACCDirectiveKind::Kernels:
     return true;
   }
   llvm_unreachable("Unhandled directive->assoc stmt");
@@ -563,6 +565,8 @@ bool doesDirectiveHaveAssociatedStmt(OpenACCDirectiveKind DirKind) {
 unsigned getOpenACCScopeFlags(OpenACCDirectiveKind DirKind) {
   switch (DirKind) {
   case OpenACCDirectiveKind::Parallel:
+  case OpenACCDirectiveKind::Serial:
+  case OpenACCDirectiveKind::Kernels:
     // Mark this as a BreakScope/ContinueScope as well as a compute construct
     // so that we can diagnose trying to 'break'/'continue' inside of one.
     return Scope::BreakScope | Scope::ContinueScope |

diff  --git a/clang/lib/Sema/SemaOpenACC.cpp b/clang/lib/Sema/SemaOpenACC.cpp
index d365a5151a4582..d3a602d1c382fa 100644
--- a/clang/lib/Sema/SemaOpenACC.cpp
+++ b/clang/lib/Sema/SemaOpenACC.cpp
@@ -27,6 +27,8 @@ bool diagnoseConstructAppertainment(Sema &S, OpenACCDirectiveKind K,
     // do anything.
     break;
   case OpenACCDirectiveKind::Parallel:
+  case OpenACCDirectiveKind::Serial:
+  case OpenACCDirectiveKind::Kernels:
     if (!IsStmt)
       return S.Diag(StartLoc, diag::err_acc_construct_appertainment) << K;
     break;
@@ -55,6 +57,8 @@ void Sema::ActOnOpenACCConstruct(OpenACCDirectiveKind K,
     // rules anywhere.
     break;
   case OpenACCDirectiveKind::Parallel:
+  case OpenACCDirectiveKind::Serial:
+  case OpenACCDirectiveKind::Kernels:
     // Nothing to do here, there is no real legalization that needs to happen
     // here as these constructs do not take any arguments.
     break;
@@ -79,6 +83,8 @@ StmtResult Sema::ActOnEndOpenACCStmtDirective(OpenACCDirectiveKind K,
   case OpenACCDirectiveKind::Invalid:
     return StmtError();
   case OpenACCDirectiveKind::Parallel:
+  case OpenACCDirectiveKind::Serial:
+  case OpenACCDirectiveKind::Kernels:
     return OpenACCComputeConstruct::Create(
         getASTContext(), K, StartLoc, EndLoc,
         AssocStmt.isUsable() ? AssocStmt.get() : nullptr);
@@ -92,6 +98,8 @@ StmtResult Sema::ActOnOpenACCAssociatedStmt(OpenACCDirectiveKind K,
   default:
     llvm_unreachable("Unimplemented associated statement application");
   case OpenACCDirectiveKind::Parallel:
+  case OpenACCDirectiveKind::Serial:
+  case OpenACCDirectiveKind::Kernels:
     // There really isn't any checking here that could happen. As long as we
     // have a statement to associate, this should be fine.
     // OpenACC 3.3 Section 6:

diff  --git a/clang/test/ParserOpenACC/parse-clauses.c b/clang/test/ParserOpenACC/parse-clauses.c
index fb2f51890d7d7f..a82c3662f2ad9e 100644
--- a/clang/test/ParserOpenACC/parse-clauses.c
+++ b/clang/test/ParserOpenACC/parse-clauses.c
@@ -60,12 +60,14 @@ void func() {
   // expected-warning at +2{{OpenACC clause 'auto' not yet implemented, clause ignored}}
   // expected-warning at +1{{OpenACC construct 'kernels loop' not yet implemented, pragma ignored}}
 #pragma acc kernels loop seq independent auto
+  for(;;){}
 
   // expected-warning at +4{{OpenACC clause 'seq' not yet implemented, clause ignored}}
   // expected-warning at +3{{OpenACC clause 'independent' not yet implemented, clause ignored}}
   // expected-warning at +2{{OpenACC clause 'auto' not yet implemented, clause ignored}}
   // expected-warning at +1{{OpenACC construct 'serial loop' not yet implemented, pragma ignored}}
 #pragma acc serial loop seq, independent auto
+  {}
 
   // expected-warning at +4{{OpenACC clause 'seq' not yet implemented, clause ignored}}
   // expected-warning at +3{{OpenACC clause 'independent' not yet implemented, clause ignored}}
@@ -140,105 +142,90 @@ void DefaultClause() {
 #pragma acc serial loop default
   for(;;){}
 
-  // expected-error at +3{{expected '('}}
-  // expected-warning at +2{{OpenACC clause 'default' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +2{{expected '('}}
+  // expected-warning at +1{{OpenACC clause 'default' not yet implemented, clause ignored}}
 #pragma acc serial default seq
   for(;;){}
 
-  // expected-error at +4{{expected '('}}
-  // expected-warning at +3{{OpenACC clause 'default' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected '('}}
+  // expected-warning at +2{{OpenACC clause 'default' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial default, seq
   for(;;){}
 
-  // expected-error at +5{{expected identifier}}
-  // expected-error at +4{{expected ')'}}
-  // expected-note at +3{{to match this '('}}
-  // expected-warning at +2{{OpenACC clause 'default' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +4{{expected identifier}}
+  // expected-error at +3{{expected ')'}}
+  // expected-note at +2{{to match this '('}}
+  // expected-warning at +1{{OpenACC clause 'default' not yet implemented, clause ignored}}
 #pragma acc serial default(
   for(;;){}
 
-  // expected-error at +5{{invalid value for 'default' clause; expected 'present' or 'none'}}
-  // expected-error at +4{{expected ')'}}
-  // expected-note at +3{{to match this '('}}
-  // expected-warning at +2{{OpenACC clause 'default' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +4{{invalid value for 'default' clause; expected 'present' or 'none'}}
+  // expected-error at +3{{expected ')'}}
+  // expected-note at +2{{to match this '('}}
+  // expected-warning at +1{{OpenACC clause 'default' not yet implemented, clause ignored}}
 #pragma acc serial default( seq
   for(;;){}
 
-  // expected-error at +5{{expected identifier}}
-  // expected-error at +4{{expected ')'}}
-  // expected-note at +3{{to match this '('}}
-  // expected-warning at +2{{OpenACC clause 'default' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +4{{expected identifier}}
+  // expected-error at +3{{expected ')'}}
+  // expected-note at +2{{to match this '('}}
+  // expected-warning at +1{{OpenACC clause 'default' not yet implemented, clause ignored}}
 #pragma acc serial default(, seq
   for(;;){}
 
-  // expected-error at +4{{expected '('}}
-  // expected-error at +3{{expected identifier}}
-  // expected-warning at +2{{OpenACC clause 'default' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected '('}}
+  // expected-error at +2{{expected identifier}}
+  // expected-warning at +1{{OpenACC clause 'default' not yet implemented, clause ignored}}
 #pragma acc serial default)
   for(;;){}
 
-  // expected-error at +4{{expected '('}}
-  // expected-error at +3{{expected identifier}}
-  // expected-warning at +2{{OpenACC clause 'default' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected '('}}
+  // expected-error at +2{{expected identifier}}
+  // expected-warning at +1{{OpenACC clause 'default' not yet implemented, clause ignored}}
 #pragma acc serial default), seq
   for(;;){}
 
-  // expected-error at +3{{expected identifier}}
-  // expected-warning at +2{{OpenACC clause 'default' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +2{{expected identifier}}
+  // expected-warning at +1{{OpenACC clause 'default' not yet implemented, clause ignored}}
 #pragma acc serial default()
   for(;;){}
 
-  // expected-error at +4{{expected identifier}}
-  // expected-warning at +3{{OpenACC clause 'default' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected identifier}}
+  // expected-warning at +2{{OpenACC clause 'default' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial default() seq
   for(;;){}
 
-  // expected-error at +4{{expected identifier}}
-  // expected-warning at +3{{OpenACC clause 'default' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected identifier}}
+  // expected-warning at +2{{OpenACC clause 'default' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial default(), seq
   for(;;){}
 
-  // expected-error at +3{{invalid value for 'default' clause; expected 'present' or 'none'}}
-  // expected-warning at +2{{OpenACC clause 'default' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +2{{invalid value for 'default' clause; expected 'present' or 'none'}}
+  // expected-warning at +1{{OpenACC clause 'default' not yet implemented, clause ignored}}
 #pragma acc serial default(invalid)
   for(;;){}
 
-  // expected-error at +4{{invalid value for 'default' clause; expected 'present' or 'none'}}
-  // expected-warning at +3{{OpenACC clause 'default' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{invalid value for 'default' clause; expected 'present' or 'none'}}
+  // expected-warning at +2{{OpenACC clause 'default' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial default(auto) seq
   for(;;){}
 
-  // expected-error at +4{{invalid value for 'default' clause; expected 'present' or 'none'}}
-  // expected-warning at +3{{OpenACC clause 'default' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{invalid value for 'default' clause; expected 'present' or 'none'}}
+  // expected-warning at +2{{OpenACC clause 'default' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial default(invalid), seq
   for(;;){}
 
-  // expected-warning at +2{{OpenACC clause 'default' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +1{{OpenACC clause 'default' not yet implemented, clause ignored}}
 #pragma acc serial default(none)
   for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'default' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'default' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial default(present), seq
   for(;;){}
 }
@@ -250,108 +237,93 @@ void IfClause() {
 #pragma acc serial loop if
   for(;;){}
 
-  // expected-error at +3{{expected '('}}
-  // expected-warning at +2{{OpenACC clause 'if' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +2{{expected '('}}
+  // expected-warning at +1{{OpenACC clause 'if' not yet implemented, clause ignored}}
 #pragma acc serial if seq
   for(;;){}
 
-  // expected-error at +4{{expected '('}}
-  // expected-warning at +3{{OpenACC clause 'if' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected '('}}
+  // expected-warning at +2{{OpenACC clause 'if' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial if, seq
   for(;;){}
 
-  // expected-error at +5{{expected expression}}
-  // expected-error at +4{{expected ')'}}
-  // expected-note at +3{{to match this '('}}
-  // expected-warning at +2{{OpenACC clause 'if' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +4{{expected expression}}
+  // expected-error at +3{{expected ')'}}
+  // expected-note at +2{{to match this '('}}
+  // expected-warning at +1{{OpenACC clause 'if' not yet implemented, clause ignored}}
 #pragma acc serial if(
   for(;;){}
 
-  // expected-error at +5{{use of undeclared identifier 'seq'}}
-  // expected-error at +4{{expected ')'}}
-  // expected-note at +3{{to match this '('}}
-  // expected-warning at +2{{OpenACC clause 'if' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +4{{use of undeclared identifier 'seq'}}
+  // expected-error at +3{{expected ')'}}
+  // expected-note at +2{{to match this '('}}
+  // expected-warning at +1{{OpenACC clause 'if' not yet implemented, clause ignored}}
 #pragma acc serial if( seq
   for(;;){}
 
-  // expected-error at +6{{expected expression}}
-  // expected-error at +5{{use of undeclared identifier 'seq'}}
-  // expected-error at +4{{expected ')'}}
-  // expected-note at +3{{to match this '('}}
-  // expected-warning at +2{{OpenACC clause 'if' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +5{{expected expression}}
+  // expected-error at +4{{use of undeclared identifier 'seq'}}
+  // expected-error at +3{{expected ')'}}
+  // expected-note at +2{{to match this '('}}
+  // expected-warning at +1{{OpenACC clause 'if' not yet implemented, clause ignored}}
 #pragma acc serial if(, seq
   for(;;){}
 
-  // expected-error at +4{{expected '('}}
-  // expected-error at +3{{expected identifier}}
-  // expected-warning at +2{{OpenACC clause 'if' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected '('}}
+  // expected-error at +2{{expected identifier}}
+  // expected-warning at +1{{OpenACC clause 'if' not yet implemented, clause ignored}}
 #pragma acc serial if)
   for(;;){}
 
-  // expected-error at +4{{expected '('}}
-  // expected-error at +3{{expected identifier}}
-  // expected-warning at +2{{OpenACC clause 'if' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected '('}}
+  // expected-error at +2{{expected identifier}}
+  // expected-warning at +1{{OpenACC clause 'if' not yet implemented, clause ignored}}
 #pragma acc serial if) seq
   for(;;){}
 
-  // expected-error at +4{{expected '('}}
-  // expected-error at +3{{expected identifier}}
-  // expected-warning at +2{{OpenACC clause 'if' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected '('}}
+  // expected-error at +2{{expected identifier}}
+  // expected-warning at +1{{OpenACC clause 'if' not yet implemented, clause ignored}}
 #pragma acc serial if), seq
   for(;;){}
 
-  // expected-error at +3{{expected expression}}
-  // expected-warning at +2{{OpenACC clause 'if' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +2{{expected expression}}
+  // expected-warning at +1{{OpenACC clause 'if' not yet implemented, clause ignored}}
 #pragma acc serial if()
   for(;;){}
 
-  // expected-error at +4{{expected expression}}
-  // expected-warning at +3{{OpenACC clause 'if' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected expression}}
+  // expected-warning at +2{{OpenACC clause 'if' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial if() seq
   for(;;){}
 
-  // expected-error at +4{{expected expression}}
-  // expected-warning at +3{{OpenACC clause 'if' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected expression}}
+  // expected-warning at +2{{OpenACC clause 'if' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial if(), seq
   for(;;){}
 
-  // expected-error at +3{{use of undeclared identifier 'invalid_expr'}}
-  // expected-warning at +2{{OpenACC clause 'if' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +2{{use of undeclared identifier 'invalid_expr'}}
+  // expected-warning at +1{{OpenACC clause 'if' not yet implemented, clause ignored}}
 #pragma acc serial if(invalid_expr)
   for(;;){}
 
-  // expected-error at +4{{expected expression}}
-  // expected-warning at +3{{OpenACC clause 'if' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected expression}}
+  // expected-warning at +2{{OpenACC clause 'if' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial if() seq
   for(;;){}
 
   int i, j;
 
-  // expected-warning at +2{{OpenACC clause 'if' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +1{{OpenACC clause 'if' not yet implemented, clause ignored}}
 #pragma acc serial if(i > j)
   for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'if' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'if' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial if(1+5>3), seq
   for(;;){}
 }
@@ -436,35 +408,30 @@ void SelfClause() {
 
   int i, j;
 
-  // expected-error at +4{{expected ')'}}
-  // expected-note at +3{{to match this '('}}
-  // expected-warning at +2{{OpenACC clause 'self' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ')'}}
+  // expected-note at +2{{to match this '('}}
+  // expected-warning at +1{{OpenACC clause 'self' not yet implemented, clause ignored}}
 #pragma acc serial self(i > j
   for(;;){}
 
-  // expected-error at +5{{use of undeclared identifier 'seq'}}
-  // expected-error at +4{{expected ')'}}
-  // expected-note at +3{{to match this '('}}
-  // expected-warning at +2{{OpenACC clause 'self' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +4{{use of undeclared identifier 'seq'}}
+  // expected-error at +3{{expected ')'}}
+  // expected-note at +2{{to match this '('}}
+  // expected-warning at +1{{OpenACC clause 'self' not yet implemented, clause ignored}}
 #pragma acc serial self(i > j, seq
   for(;;){}
 
-  // expected-warning at +3{{left operand of comma operator has no effect}}
-  // expected-warning at +2{{OpenACC clause 'self' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{left operand of comma operator has no effect}}
+  // expected-warning at +1{{OpenACC clause 'self' not yet implemented, clause ignored}}
 #pragma acc serial self(i, j)
   for(;;){}
 
-  // expected-warning at +2{{OpenACC clause 'self' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +1{{OpenACC clause 'self' not yet implemented, clause ignored}}
 #pragma acc serial self(i > j)
   for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'self' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'self' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial self(1+5>3), seq
   for(;;){}
 }
@@ -502,478 +469,478 @@ void SelfUpdate() {
 }
 
 void VarListClauses() {
-  // expected-error at +3{{expected '('}}
-  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +2{{expected '('}}
+  // expected-warning at +1{{OpenACC clause 'copy' not yet implemented, clause ignored}}
 #pragma acc serial copy
+  for(;;){}
 
-  // expected-error at +4{{expected '('}}
-  // expected-warning at +3{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected '('}}
+  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copy, seq
+  for(;;){}
 
-  // expected-error at +4{{expected '('}}
-  // expected-error at +3{{expected identifier}}
-  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected '('}}
+  // expected-error at +2{{expected identifier}}
+  // expected-warning at +1{{OpenACC clause 'copy' not yet implemented, clause ignored}}
 #pragma acc serial copy)
+  for(;;){}
 
-  // expected-error at +4{{expected '('}}
-  // expected-error at +3{{expected identifier}}
-  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected '('}}
+  // expected-error at +2{{expected identifier}}
+  // expected-warning at +1{{OpenACC clause 'copy' not yet implemented, clause ignored}}
 #pragma acc serial copy), seq
+  for(;;){}
 
-  // expected-error at +5{{expected expression}}
-  // expected-error at +4{{expected ')'}}
-  // expected-note at +3{{to match this '('}}
-  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +4{{expected expression}}
+  // expected-error at +3{{expected ')'}}
+  // expected-note at +2{{to match this '('}}
+  // expected-warning at +1{{OpenACC clause 'copy' not yet implemented, clause ignored}}
 #pragma acc serial copy(
+  for(;;){}
 
-  // expected-error at +5{{expected expression}}
-  // expected-error at +4{{expected ')'}}
-  // expected-note at +3{{to match this '('}}
-  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +4{{expected expression}}
+  // expected-error at +3{{expected ')'}}
+  // expected-note at +2{{to match this '('}}
+  // expected-warning at +1{{OpenACC clause 'copy' not yet implemented, clause ignored}}
 #pragma acc serial copy(, seq
+  for(;;){}
 
-  // expected-error at +3{{expected expression}}
-  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +2{{expected expression}}
+  // expected-warning at +1{{OpenACC clause 'copy' not yet implemented, clause ignored}}
 #pragma acc serial copy()
+  for(;;){}
 
-  // expected-error at +4{{expected expression}}
-  // expected-warning at +3{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected expression}}
+  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copy(), seq
+  for(;;){}
 
   struct Members s;
   struct HasMembersArray HasMem;
 
-  // expected-warning at +3{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copy(s.array[s.value]), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copy(s.array[s.value], s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copy(HasMem.MemArr[3].array[1]), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copy(HasMem.MemArr[3].array[1:4]), seq
+  for(;;){}
 
-  // expected-error at +4{{OpenMP array section is not allowed here}}
-  // expected-warning at +3{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{OpenMP array section is not allowed here}}
+  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copy(HasMem.MemArr[1:3].array[1]), seq
+  for(;;){}
 
-  // expected-error at +4{{OpenMP array section is not allowed here}}
-  // expected-warning at +3{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{OpenMP array section is not allowed here}}
+  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copy(HasMem.MemArr[1:3].array[1:2]), seq
+  for(;;){}
 
-  // expected-error at +4{{expected expression}}
-  // expected-warning at +3{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected expression}}
+  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copy(HasMem.MemArr[:]), seq
+  for(;;){}
 
-  // expected-error at +4{{expected expression}}
-  // expected-warning at +3{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected expression}}
+  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copy(HasMem.MemArr[::]), seq
+  for(;;){}
 
-  // expected-error at +6{{expected expression}}
-  // expected-error at +5{{expected ']'}}
-  // expected-note at +4{{to match this '['}}
-  // expected-warning at +3{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +5{{expected expression}}
+  // expected-error at +4{{expected ']'}}
+  // expected-note at +3{{to match this '['}}
+  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copy(HasMem.MemArr[: :]), seq
+  for(;;){}
 
-  // expected-error at +4{{expected expression}}
-  // expected-warning at +3{{OpenACC clause 'copy' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected expression}}
+  // expected-warning at +2{{OpenACC clause 'copy' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copy(HasMem.MemArr[3:]), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'use_device' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'use_device' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial use_device(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'use_device' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'use_device' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial use_device(s.array[s.value : 5]), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'no_create' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'no_create' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial no_create(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'no_create' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'no_create' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial no_create(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'present' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'present' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial present(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'present' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'present' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial present(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'deviceptr' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'deviceptr' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial deviceptr(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'deviceptr' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'deviceptr' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial deviceptr(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'attach' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'attach' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial attach(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'attach' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'attach' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial attach(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'detach' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'detach' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial detach(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'detach' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'detach' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial detach(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'private' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'private' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial private(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'private' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'private' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial private(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'firstprivate' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'firstprivate' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial firstprivate(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'firstprivate' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'firstprivate' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial firstprivate(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'delete' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'delete' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial delete(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'delete' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'delete' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial delete(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'use_device' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'use_device' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial use_device(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'use_device' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'use_device' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial use_device(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'device_resident' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'device_resident' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial device_resident(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'device_resident' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'device_resident' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial device_resident(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'link' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'link' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial link(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'link' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'link' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial link(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'host' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'host' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial host(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'host' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'host' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial host(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'device' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'device' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial device(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'device' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'device' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial device(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyout(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyout(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyout(zero:s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyout(zero : s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{use of undeclared identifier 'zero'}}
-  // expected-warning at +3{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{use of undeclared identifier 'zero'}}
+  // expected-warning at +2{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyout(zero s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{invalid tag 'readonly' on 'copyout' clause}}
-  // expected-warning at +3{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{invalid tag 'readonly' on 'copyout' clause}}
+  // expected-warning at +2{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyout(readonly:s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{invalid tag 'invalid' on 'copyout' clause}}
-  // expected-warning at +3{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{invalid tag 'invalid' on 'copyout' clause}}
+  // expected-warning at +2{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyout(invalid:s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{invalid tag 'invalid' on 'copyout' clause}}
-  // expected-warning at +3{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{invalid tag 'invalid' on 'copyout' clause}}
+  // expected-warning at +2{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyout(invalid:s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{use of undeclared identifier 'invalid'}}
-  // expected-warning at +3{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{use of undeclared identifier 'invalid'}}
+  // expected-warning at +2{{OpenACC clause 'copyout' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyout(invalid s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'create' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'create' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial create(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'create' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'create' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial create(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'create' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'create' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial create(zero:s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'create' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'create' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial create(zero : s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{use of undeclared identifier 'zero'}}
-  // expected-warning at +3{{OpenACC clause 'create' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{use of undeclared identifier 'zero'}}
+  // expected-warning at +2{{OpenACC clause 'create' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial create(zero s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{invalid tag 'readonly' on 'create' clause}}
-  // expected-warning at +3{{OpenACC clause 'create' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{invalid tag 'readonly' on 'create' clause}}
+  // expected-warning at +2{{OpenACC clause 'create' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial create(readonly:s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{invalid tag 'invalid' on 'create' clause}}
-  // expected-warning at +3{{OpenACC clause 'create' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{invalid tag 'invalid' on 'create' clause}}
+  // expected-warning at +2{{OpenACC clause 'create' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial create(invalid:s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{invalid tag 'invalid' on 'create' clause}}
-  // expected-warning at +3{{OpenACC clause 'create' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{invalid tag 'invalid' on 'create' clause}}
+  // expected-warning at +2{{OpenACC clause 'create' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial create(invalid:s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{use of undeclared identifier 'invalid'}}
-  // expected-warning at +3{{OpenACC clause 'create' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{use of undeclared identifier 'invalid'}}
+  // expected-warning at +2{{OpenACC clause 'create' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial create(invalid s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{expected ','}}
-  // expected-warning at +3{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected ','}}
+  // expected-warning at +2{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyin(s.array[s.value] s.array[s.value :5] ), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyin(s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyin(readonly:s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-warning at +3{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +2{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyin(readonly : s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{use of undeclared identifier 'readonly'}}
-  // expected-warning at +3{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{use of undeclared identifier 'readonly'}}
+  // expected-warning at +2{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyin(readonly s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{invalid tag 'zero' on 'copyin' clause}}
-  // expected-warning at +3{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{invalid tag 'zero' on 'copyin' clause}}
+  // expected-warning at +2{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyin(zero :s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{invalid tag 'invalid' on 'copyin' clause}}
-  // expected-warning at +3{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{invalid tag 'invalid' on 'copyin' clause}}
+  // expected-warning at +2{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyin(invalid:s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{invalid tag 'invalid' on 'copyin' clause}}
-  // expected-warning at +3{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{invalid tag 'invalid' on 'copyin' clause}}
+  // expected-warning at +2{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyin(invalid:s.array[s.value : 5], s.value), seq
+  for(;;){}
 
-  // expected-error at +4{{use of undeclared identifier 'invalid'}}
-  // expected-warning at +3{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{use of undeclared identifier 'invalid'}}
+  // expected-warning at +2{{OpenACC clause 'copyin' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial copyin(invalid s.array[s.value : 5], s.value), seq
+  for(;;){}
 }
 
 void ReductionClauseParsing() {
   char *Begin, *End;
-  // expected-error at +3{{expected '('}}
-  // expected-warning at +2{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +2{{expected '('}}
+  // expected-warning at +1{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
 #pragma acc serial reduction
-  // expected-error at +4{{missing reduction operator, expected '+', '*', 'max', 'min', '&', '|', '^', '&&', or '||', follwed by a ':'}}
-  // expected-error at +3{{expected expression}}
-  // expected-warning at +2{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
-#pragma acc serial reduction()
+  for(;;){}
   // expected-error at +3{{missing reduction operator, expected '+', '*', 'max', 'min', '&', '|', '^', '&&', or '||', follwed by a ':'}}
-  // expected-warning at +2{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +2{{expected expression}}
+  // expected-warning at +1{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
+#pragma acc serial reduction()
+  for(;;){}
+  // expected-error at +2{{missing reduction operator, expected '+', '*', 'max', 'min', '&', '|', '^', '&&', or '||', follwed by a ':'}}
+  // expected-warning at +1{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
 #pragma acc serial reduction(Begin)
-  // expected-error at +3{{missing reduction operator, expected '+', '*', 'max', 'min', '&', '|', '^', '&&', or '||', follwed by a ':'}}
-  // expected-warning at +2{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  for(;;){}
+  // expected-error at +2{{missing reduction operator, expected '+', '*', 'max', 'min', '&', '|', '^', '&&', or '||', follwed by a ':'}}
+  // expected-warning at +1{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
 #pragma acc serial reduction(Begin, End)
-  // expected-error at +3{{missing reduction operator, expected '+', '*', 'max', 'min', '&', '|', '^', '&&', or '||', follwed by a ':'}}
-  // expected-warning at +2{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  for(;;){}
+  // expected-error at +2{{missing reduction operator, expected '+', '*', 'max', 'min', '&', '|', '^', '&&', or '||', follwed by a ':'}}
+  // expected-warning at +1{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
 #pragma acc serial reduction(Begin, End)
-  // expected-warning at +2{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  for(;;){}
+  // expected-warning at +1{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
 #pragma acc serial reduction(+:Begin)
-  // expected-warning at +2{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  for(;;){}
+  // expected-warning at +1{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
 #pragma acc serial reduction(+:Begin, End)
-  // expected-warning at +2{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  for(;;){}
+  // expected-warning at +1{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
 #pragma acc serial reduction(*: Begin, End)
-  // expected-warning at +2{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  for(;;){}
+  // expected-warning at +1{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
 #pragma acc serial reduction(max : Begin, End)
-  // expected-warning at +2{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  for(;;){}
+  // expected-warning at +1{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
 #pragma acc serial reduction(min: Begin, End)
-  // expected-warning at +2{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  for(;;){}
+  // expected-warning at +1{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
 #pragma acc serial reduction(&: Begin, End)
-  // expected-warning at +2{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  for(;;){}
+  // expected-warning at +1{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
 #pragma acc serial reduction(|: Begin, End)
-  // expected-warning at +2{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  for(;;){}
+  // expected-warning at +1{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
 #pragma acc serial reduction(^: Begin, End)
-  // expected-warning at +3{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +2{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
-#pragma acc serial seq, reduction(&&: Begin, End)
-  // expected-warning at +3{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
+  for(;;){}
   // expected-warning at +2{{OpenACC clause 'seq' not yet implemented, clause ignored}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-warning at +1{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
+#pragma acc serial seq, reduction(&&: Begin, End)
+  for(;;){}
+  // expected-warning at +2{{OpenACC clause 'reduction' not yet implemented, clause ignored}}
+  // expected-warning at +1{{OpenACC clause 'seq' not yet implemented, clause ignored}}
 #pragma acc serial reduction(||: Begin, End), seq
+  for(;;){}
 }
 
 int returns_int();

diff  --git a/clang/test/ParserOpenACC/parse-constructs.c b/clang/test/ParserOpenACC/parse-constructs.c
index adb5e3c7c75527..ecedfd9e9e6d6a 100644
--- a/clang/test/ParserOpenACC/parse-constructs.c
+++ b/clang/test/ParserOpenACC/parse-constructs.c
@@ -39,23 +39,19 @@ void func() {
   // expected-note at +1{{to match this '('}}
 #pragma acc parallel( clause list
   for(;;){}
-  // expected-error at +3{{expected clause-list or newline in OpenACC directive}}
-  // expected-error at +2{{invalid OpenACC clause 'clause'}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +2{{expected clause-list or newline in OpenACC directive}}
+  // expected-error at +1{{invalid OpenACC clause 'clause'}}
 #pragma acc serial() clause list
   for(;;){}
-  // expected-error at +4{{expected clause-list or newline in OpenACC directive}}
-  // expected-error at +3{{expected ')'}}
-  // expected-note at +2{{to match this '('}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +3{{expected clause-list or newline in OpenACC directive}}
+  // expected-error at +2{{expected ')'}}
+  // expected-note at +1{{to match this '('}}
 #pragma acc serial( clause list
   for(;;){}
-  // expected-error at +2{{invalid OpenACC clause 'clause'}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +1{{invalid OpenACC clause 'clause'}}
 #pragma acc serial clause list
   for(;;){}
-  // expected-error at +2{{invalid OpenACC clause 'clause'}}
-  // expected-warning at +1{{OpenACC construct 'kernels' not yet implemented, pragma ignored}}
+  // expected-error at +1{{invalid OpenACC clause 'clause'}}
 #pragma acc kernels clause list
   for(;;){}
   // expected-error at +2{{invalid OpenACC clause 'clause'}}
@@ -93,8 +89,7 @@ void func() {
   // expected-error at +1{{invalid OpenACC clause 'invalid'}}
 #pragma acc parallel invalid clause list
   for(;;){}
-  // expected-error at +2{{invalid OpenACC clause 'invalid'}}
-  // expected-warning at +1{{OpenACC construct 'serial' not yet implemented, pragma ignored}}
+  // expected-error at +1{{invalid OpenACC clause 'invalid'}}
 #pragma acc serial invalid clause list
   for(;;){}
   // expected-error at +2{{invalid OpenACC clause 'clause'}}

diff  --git a/clang/test/SemaOpenACC/compute-construct-ast.cpp b/clang/test/SemaOpenACC/compute-construct-ast.cpp
index 351fd1c3e0ee56..0d1d0b26657369 100644
--- a/clang/test/SemaOpenACC/compute-construct-ast.cpp
+++ b/clang/test/SemaOpenACC/compute-construct-ast.cpp
@@ -15,6 +15,30 @@ void NormalFunc() {
 #pragma acc parallel
     {}
   }
+  // FIXME: Add a test once we have clauses for this.
+  // CHECK-NEXT: OpenACCComputeConstruct {{.*}}serial
+  // CHECK-NEXT: CompoundStmt
+#pragma acc serial
+  {
+#pragma acc serial
+  // CHECK-NEXT: OpenACCComputeConstruct {{.*}}serial
+  // CHECK-NEXT: OpenACCComputeConstruct {{.*}}serial
+  // CHECK-NEXT: CompoundStmt
+#pragma acc serial
+    {}
+  }
+  // FIXME: Add a test once we have clauses for this.
+  // CHECK-NEXT: OpenACCComputeConstruct {{.*}}kernels
+  // CHECK-NEXT: CompoundStmt
+#pragma acc kernels
+  {
+#pragma acc kernels
+  // CHECK-NEXT: OpenACCComputeConstruct {{.*}}kernels
+  // CHECK-NEXT: OpenACCComputeConstruct {{.*}}kernels
+  // CHECK-NEXT: CompoundStmt
+#pragma acc kernels
+    {}
+  }
 }
 
 template<typename T>
@@ -24,6 +48,16 @@ void TemplFunc() {
     typename T::type I;
   }
 
+#pragma acc serial
+  {
+    typename T::type I;
+  }
+
+#pragma acc kernels
+  {
+    typename T::type I;
+  }
+
   // CHECK-LABEL: FunctionTemplateDecl {{.*}}TemplFunc
   // CHECK-NEXT: TemplateTypeParmDecl
 
@@ -34,6 +68,14 @@ void TemplFunc() {
   // CHECK-NEXT: CompoundStmt
   // CHECK-NEXT: DeclStmt
   // CHECK-NEXT: VarDecl{{.*}} I 'typename T::type'
+  // CHECK-NEXT: OpenACCComputeConstruct {{.*}}serial
+  // CHECK-NEXT: CompoundStmt
+  // CHECK-NEXT: DeclStmt
+  // CHECK-NEXT: VarDecl{{.*}} I 'typename T::type'
+  // CHECK-NEXT: OpenACCComputeConstruct {{.*}}kernels
+  // CHECK-NEXT: CompoundStmt
+  // CHECK-NEXT: DeclStmt
+  // CHECK-NEXT: VarDecl{{.*}} I 'typename T::type'
 
   // Check instantiation.
   // CHECK-LABEL: FunctionDecl{{.*}} used TemplFunc 'void ()' implicit_instantiation
@@ -45,6 +87,14 @@ void TemplFunc() {
   // CHECK-NEXT: CompoundStmt
   // CHECK-NEXT: DeclStmt
   // CHECK-NEXT: VarDecl{{.*}} I 'typename S::type':'int'
+  // CHECK-NEXT: OpenACCComputeConstruct {{.*}}serial
+  // CHECK-NEXT: CompoundStmt
+  // CHECK-NEXT: DeclStmt
+  // CHECK-NEXT: VarDecl{{.*}} I 'typename S::type':'int'
+  // CHECK-NEXT: OpenACCComputeConstruct {{.*}}kernels
+  // CHECK-NEXT: CompoundStmt
+  // CHECK-NEXT: DeclStmt
+  // CHECK-NEXT: VarDecl{{.*}} I 'typename S::type':'int'
 }
 
 struct S {

diff  --git a/clang/test/SemaOpenACC/no-branch-in-out.c b/clang/test/SemaOpenACC/no-branch-in-out.c
index eccc6432450045..5fff18eb7cdd7b 100644
--- a/clang/test/SemaOpenACC/no-branch-in-out.c
+++ b/clang/test/SemaOpenACC/no-branch-in-out.c
@@ -37,6 +37,18 @@ void BreakContinue() {
       break; // expected-error{{invalid branch out of OpenACC Compute Construct}}
   }
 
+#pragma acc serial
+  for(int i = 0; i < 5; ++i) {
+    if (i > 1)
+      break; // expected-error{{invalid branch out of OpenACC Compute Construct}}
+  }
+
+#pragma acc kernels
+  for(int i = 0; i < 5; ++i) {
+    if (i > 1)
+      break; // expected-error{{invalid branch out of OpenACC Compute Construct}}
+  }
+
 #pragma acc parallel
   switch(j) {
     case 1:
@@ -99,6 +111,16 @@ void Return() {
     return;// expected-error{{invalid return out of OpenACC Compute Construct}}
   }
 
+#pragma acc serial
+  {
+    return;// expected-error{{invalid return out of OpenACC Compute Construct}}
+  }
+
+#pragma acc kernels
+  {
+    return;// expected-error{{invalid return out of OpenACC Compute Construct}}
+  }
+
 #pragma acc parallel
   {
     {
@@ -255,6 +277,34 @@ LABEL13:{}
   LABEL14:{}
   ({goto LABEL14;});
   }
+
+
+
+  ({goto LABEL15;});// expected-error{{cannot jump from this goto statement to its label}}
+#pragma acc serial// expected-note{{invalid branch into OpenACC Compute Construct}}
+  {
+LABEL15:{}
+  }
+
+LABEL16:{}
+#pragma acc serial// expected-note{{invalid branch out of OpenACC Compute Construct}}
+  {
+  ({goto LABEL16;});// expected-error{{cannot jump from this goto statement to its label}}
+  }
+
+
+  ({goto LABEL17;});// expected-error{{cannot jump from this goto statement to its label}}
+#pragma acc kernels// expected-note{{invalid branch into OpenACC Compute Construct}}
+  {
+LABEL17:{}
+  }
+
+LABEL18:{}
+#pragma acc kernels// expected-note{{invalid branch out of OpenACC Compute Construct}}
+  {
+  ({goto LABEL18;});// expected-error{{cannot jump from this goto statement to its label}}
+  }
+
 }
 
 void IndirectGoto1() {
@@ -329,6 +379,14 @@ void DuffsDevice() {
   }
   }
 
+  switch (j) {
+#pragma acc kernels
+  for(int i =0; i < 5; ++i) {
+    default: // expected-error{{invalid branch into OpenACC Compute Construct}}
+      {}
+  }
+  }
+
   switch (j) {
 #pragma acc parallel
   for(int i =0; i < 5; ++i) {
@@ -336,4 +394,12 @@ void DuffsDevice() {
       {}
   }
   }
+
+  switch (j) {
+#pragma acc serial
+  for(int i =0; i < 5; ++i) {
+    case 'a' ... 'z': // expected-error{{invalid branch into OpenACC Compute Construct}}
+      {}
+  }
+  }
 }

diff  --git a/clang/test/SemaOpenACC/no-branch-in-out.cpp b/clang/test/SemaOpenACC/no-branch-in-out.cpp
index 6ee4553cd30351..bc559f1898f1bc 100644
--- a/clang/test/SemaOpenACC/no-branch-in-out.cpp
+++ b/clang/test/SemaOpenACC/no-branch-in-out.cpp
@@ -147,6 +147,17 @@ void Exceptions() {
     throw; // expected-error{{invalid throw out of OpenACC Compute Construct}}
   }
 
+#pragma acc serial
+  for(int i = 0; i < 5; ++i) {
+    throw; // expected-error{{invalid throw out of OpenACC Compute Construct}}
+  }
+
+#pragma acc kernels
+  for(int i = 0; i < 5; ++i) {
+    throw; // expected-error{{invalid throw out of OpenACC Compute Construct}}
+  }
+
+
 #pragma acc parallel
   for(int i = 0; i < 5; ++i) {
     try {

diff  --git a/clang/test/SemaOpenACC/parallel-assoc-stmt-inst.cpp b/clang/test/SemaOpenACC/parallel-assoc-stmt-inst.cpp
index 0464e164a754e6..f533baa4c0e68c 100644
--- a/clang/test/SemaOpenACC/parallel-assoc-stmt-inst.cpp
+++ b/clang/test/SemaOpenACC/parallel-assoc-stmt-inst.cpp
@@ -4,6 +4,10 @@ template<typename T>
 void Func() {
 #pragma acc parallel
     typename T::type I; //#ILOC
+#pragma acc serial
+    typename T::type IS; //#ILOCSERIAL
+#pragma acc kernels
+    typename T::type IK; //#ILOCKERNELS
 }
 
 struct S {
@@ -13,6 +17,8 @@ struct S {
 void use() {
   Func<S>();
   // expected-error@#ILOC{{type 'int' cannot be used prior to '::' because it has no members}}
-  // expected-note at +1{{in instantiation of function template specialization 'Func<int>' requested here}}
+  // expected-note at +3{{in instantiation of function template specialization 'Func<int>' requested here}}
+  // expected-error@#ILOCSERIAL{{type 'int' cannot be used prior to '::' because it has no members}}
+  // expected-error@#ILOCKERNELS{{type 'int' cannot be used prior to '::' because it has no members}}
   Func<int>();
 }

diff  --git a/clang/test/SemaOpenACC/parallel-loc-and-stmt.c b/clang/test/SemaOpenACC/parallel-loc-and-stmt.c
index 5189a6aa44f042..ba29f6da8ba25d 100644
--- a/clang/test/SemaOpenACC/parallel-loc-and-stmt.c
+++ b/clang/test/SemaOpenACC/parallel-loc-and-stmt.c
@@ -3,14 +3,32 @@
 // expected-error at +1{{OpenACC construct 'parallel' cannot be used here; it can only be used in a statement context}}
 #pragma acc parallel
 
+// expected-error at +1{{OpenACC construct 'serial' cannot be used here; it can only be used in a statement context}}
+#pragma acc serial
+
+// expected-error at +1{{OpenACC construct 'kernels' cannot be used here; it can only be used in a statement context}}
+#pragma acc kernels
+
 // expected-error at +1{{OpenACC construct 'parallel' cannot be used here; it can only be used in a statement context}}
 #pragma acc parallel
 int foo;
+// expected-error at +1{{OpenACC construct 'serial' cannot be used here; it can only be used in a statement context}}
+#pragma acc serial
+int foo2;
+// expected-error at +1{{OpenACC construct 'kernels' cannot be used here; it can only be used in a statement context}}
+#pragma acc kernels
+int foo3;
 
 struct S {
 // expected-error at +1{{OpenACC construct 'parallel' cannot be used here; it can only be used in a statement context}}
 #pragma acc parallel
 int foo;
+// expected-error at +1{{OpenACC construct 'serial' cannot be used here; it can only be used in a statement context}}
+#pragma acc serial
+int foo2;
+// expected-error at +1{{OpenACC construct 'kernels' cannot be used here; it can only be used in a statement context}}
+#pragma acc kernels
+int foo3;
 };
 
 void func() {
@@ -31,6 +49,15 @@ void func() {
 #pragma acc parallel
   }
 
+  {
+// expected-error at +2{{expected statement}}
+#pragma acc serial
+  }
+  {
+// expected-error at +2{{expected statement}}
+#pragma acc kernels
+  }
+
 #pragma acc parallel
   while(0){}
 


        


More information about the cfe-commits mailing list