xref: /llvm-project/openmp/runtime/test/api/omp_deprecated.c (revision aa6e7e8da8f5a2706f0b330718df203b3650408e)
1*aa6e7e8dSAndreyChurbanov // RUN: %libomp-compile && env KMP_WARNINGS=false %libomp-run 2>&1 | FileCheck %s
2*aa6e7e8dSAndreyChurbanov // The test checks that KMP_WARNINGS=false suppresses library warnings
3*aa6e7e8dSAndreyChurbanov 
4*aa6e7e8dSAndreyChurbanov #include <stdio.h>
5*aa6e7e8dSAndreyChurbanov #include <stdlib.h>
6*aa6e7e8dSAndreyChurbanov #include <omp.h>
main(int argc,char ** argv)7*aa6e7e8dSAndreyChurbanov int main(int argc, char** argv) {
8*aa6e7e8dSAndreyChurbanov   omp_set_nested(1);
9*aa6e7e8dSAndreyChurbanov   if (!omp_get_nested()) {
10*aa6e7e8dSAndreyChurbanov     printf("error: omp_set_nested(1) failed\n");
11*aa6e7e8dSAndreyChurbanov     return 1;
12*aa6e7e8dSAndreyChurbanov   }
13*aa6e7e8dSAndreyChurbanov   printf("passed\n");
14*aa6e7e8dSAndreyChurbanov   return 0;
15*aa6e7e8dSAndreyChurbanov }
16*aa6e7e8dSAndreyChurbanov 
17*aa6e7e8dSAndreyChurbanov // CHECK-NOT: omp_set_nested routine deprecated
18*aa6e7e8dSAndreyChurbanov // CHECK-NOT: omp_get_nested routine deprecated
19