TargetParser: AArch64: Add part numbers for Apple CPUs.
[llvm-project.git] / openmp / runtime / test / misc_bugs / omp__kmpc_fork_call_if.c
blob60d4bff9678747de64b2b500a0062ea319b93b89
1 // RUN: %libomp-compile && %t | FileCheck %s
3 #include <stdio.h>
4 #include <omp.h>
6 typedef int32_t kmp_int32;
7 typedef void *ident_t;
8 typedef void *kmpc_micro;
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 extern void __kmpc_fork_call_if(ident_t *loc, kmp_int32 argc,
14 kmpc_micro microtask, kmp_int32 cond,
15 void *args);
16 #ifdef __cplusplus
18 #endif
20 // Microtask function for parallel region
21 void microtask(int *global_tid, int *bound_tid) {
22 // CHECK: PASS
23 if (omp_in_parallel()) {
24 printf("FAIL\n");
25 } else {
26 printf("PASS\n");
30 int main() {
31 // Condition for parallelization (false in this case)
32 int cond = 0;
33 // Call __kmpc_fork_call_if
34 __kmpc_fork_call_if(NULL, 0, microtask, cond, NULL);
35 return 0;