[clang] 3169a38 - [OpenACC] Add ast-print test for combined constructs

via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 13 07:12:01 PST 2024


Author: erichkeane
Date: 2024-11-13T07:11:56-08:00
New Revision: 3169a38ddf75277030471a996ebd981f9dd51aa3

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

LOG: [OpenACC] Add ast-print test for combined constructs

Added: 
    clang/test/AST/ast-print-openacc-combined-construct.cpp

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/clang/test/AST/ast-print-openacc-combined-construct.cpp b/clang/test/AST/ast-print-openacc-combined-construct.cpp
new file mode 100644
index 00000000000000..5318640eddf535
--- /dev/null
+++ b/clang/test/AST/ast-print-openacc-combined-construct.cpp
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 -fopenacc -Wno-openacc-deprecated-clause-alias -ast-print %s -o - | FileCheck %s
+
+void foo() {
+// CHECK: #pragma acc parallel loop
+// CHECK-NEXT: for (int i = 0; i < 5; ++i)
+// CHECK-NEXT: ;
+#pragma acc parallel loop
+  for(int i = 0;i<5;++i);
+// CHECK: #pragma acc serial loop
+// CHECK-NEXT: for (int i = 0; i < 5; ++i)
+// CHECK-NEXT: ;
+#pragma acc serial loop
+  for(int i = 0;i<5;++i);
+// CHECK: #pragma acc kernels loop
+// CHECK-NEXT: for (int i = 0; i < 5; ++i)
+// CHECK-NEXT: ;
+#pragma acc kernels loop
+  for(int i = 0;i<5;++i);
+// CHECK: #pragma acc parallel loop auto
+// CHECK-NEXT: for (int i = 0; i < 5; ++i)
+// CHECK-NEXT: ;
+#pragma acc parallel loop auto
+  for(int i = 0;i<5;++i);
+// CHECK: #pragma acc serial loop seq
+// CHECK-NEXT: for (int i = 0; i < 5; ++i)
+// CHECK-NEXT: ;
+#pragma acc serial loop seq
+  for(int i = 0;i<5;++i);
+// CHECK: #pragma acc kernels loop independent
+// CHECK-NEXT: for (int i = 0; i < 5; ++i)
+// CHECK-NEXT: ;
+#pragma acc kernels loop independent
+  for(int i = 0;i<5;++i);
+}


        


More information about the cfe-commits mailing list