Files
clang-p2996/clang/test/AST/ast-print-openacc-wait-construct.cpp
erichkeane e34cc7c993 [OpenACC] Implement 'wait' construct
The arguments to this are the same as for the 'wait' clause, so this
reuses all of that infrastructure. So all this has to do is support a
pair of clauses that are already implemented (if and async), plus create
an AST node.  This patch does so, and adds proper testing.
2024-12-18 15:06:01 -08:00

23 lines
647 B
C++

// RUN: %clang_cc1 -fopenacc -ast-print %s -o - | FileCheck %s
void uses() {
int *iPtr;
int I;
float array[5];
// CHECK: #pragma acc wait() if(I == array[I])
#pragma acc wait() if(I == array[I])
// CHECK: #pragma acc wait(*iPtr, I) async
#pragma acc wait(*iPtr, I) async
// CHECK: #pragma acc wait(queues: *iPtr, I) async(*iPtr)
#pragma acc wait(queues:*iPtr, I) async(*iPtr)
// CHECK: #pragma acc wait(devnum: I : *iPtr, I) async(I)
#pragma acc wait(devnum:I:*iPtr, I) async(I)
// CHECK: #pragma acc wait(devnum: I : queues: *iPtr, I) if(I == array[I]) async(I)
#pragma acc wait(devnum:I:queues:*iPtr, I) if(I == array[I]) async(I)
}