xref: /llvm-project/offload/test/api/assert.c (revision 330d8983d25d08580fc1642fea48b2473f47a9da)
1*330d8983SJohannes Doerfert // RUN: %libomptarget-compile-run-and-check-generic
2*330d8983SJohannes Doerfert // RUN: %libomptarget-compileopt-run-and-check-generic
3*330d8983SJohannes Doerfert 
4*330d8983SJohannes Doerfert #include <assert.h>
5*330d8983SJohannes Doerfert #include <stdio.h>
6*330d8983SJohannes Doerfert 
main()7*330d8983SJohannes Doerfert int main() {
8*330d8983SJohannes Doerfert   int i = 1;
9*330d8983SJohannes Doerfert #pragma omp target
10*330d8983SJohannes Doerfert   assert(i > 0);
11*330d8983SJohannes Doerfert 
12*330d8983SJohannes Doerfert   // CHECK: PASS
13*330d8983SJohannes Doerfert   printf("PASS\n");
14*330d8983SJohannes Doerfert   return 0;
15*330d8983SJohannes Doerfert }
16