26 lines · plain
1! REQUIRES: openmp_runtime2 3! RUN: %flang_fc1 -emit-hlfir %openmp_flags %s -o - 2>&1 | FileCheck %s4! RUN: bbc %openmp_flags -emit-hlfir -o - %s 2>&1 | FileCheck %s5! RUN: %flang_fc1 -emit-fir %openmp_flags %s -o - 2>&1 | FileCheck %s6! RUN: bbc -emit-fir %openmp_flags -o - %s 2>&1 | FileCheck %s7!8! Test that the calls to omp_lib's omp_get_num_threads and omp_set_num_threads9! get lowered even though their implementation is not in the omp_lib module10! (and this matters because this is an intrinsic module - and calls to11! intrinsics are specially resolved).12 13program main14 use omp_lib15 integer(omp_integer_kind) :: num_threads16 integer(omp_integer_kind), parameter :: requested_num_threads = 417 call omp_set_num_threads(requested_num_threads)18 num_threads = omp_get_num_threads()19 print *, num_threads20end program21 22!CHECK-NOT: not yet implemented: intrinsic: omp_set_num_threads23!CHECK-NOT: not yet implemented: intrinsic: omp_get_num_threads24!CHECK: fir.call @omp_set_num_threads25!CHECK: fir.call @omp_get_num_threads26