Bump version to 19.1.0-rc3
[llvm-project.git] / offload / test / offloading / runtime_init.c
blob96fd50f51da1e82a607bd078e1097bc0930ccd63
1 // RUN: %libomptarget-compile-generic
2 // RUN: env LIBOMPTARGET_DEBUG=1 %libomptarget-run-generic 2>&1 \
3 // RUN: %fcheck-generic
5 // REQUIRES: libomptarget-debug
7 #include <omp.h>
8 #include <stdio.h>
10 extern void __tgt_rtl_init(void);
11 extern void __tgt_rtl_deinit(void);
13 // Sanity checks to make sure that this works and is thread safe.
14 int main() {
15 // CHECK: Init offload library!
16 // CHECK: Deinit offload library!
17 __tgt_rtl_init();
18 #pragma omp parallel num_threads(8)
20 __tgt_rtl_init();
21 __tgt_rtl_deinit();
23 __tgt_rtl_deinit();
25 __tgt_rtl_init();
26 __tgt_rtl_deinit();
28 // CHECK: PASS
29 printf("PASS\n");