LLVM OpenMP
20.0.0git
runtime
test
tasking
bug_36720.c
Go to the documentation of this file.
1
// RUN: %libomp-compile-and-run
2
3
/*
4
Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=36720
5
6
Assertion failure at kmp_runtime.cpp(1715): nthreads > 0.
7
OMP: Error #13: Assertion failure at kmp_runtime.cpp(1715).
8
9
The assertion fails even with OMP_NUM_THREADS=1. If the second task is removed,
10
everything runs to completion. If the "omp parallel for" directives are removed
11
from inside the tasks, once again everything runs fine.
12
*/
13
14
#define N 1024
15
16
int
main
() {
17
#pragma omp task
18
{
19
int
i
;
20
#pragma omp parallel for
21
for
(
i
= 0;
i
<
N
;
i
++)
22
(
void
)0;
23
}
24
25
#pragma omp task
26
{
27
int
i
;
28
#pragma omp parallel for
29
for
(
i
= 0;
i
<
N
; ++
i
)
30
(
void
)0;
31
}
32
33
#pragma omp taskwait
34
35
return
0;
36
}
N
#define N
Definition:
bug_36720.c:14
main
int main()
Definition:
bug_36720.c:16
i
#define i
Definition:
kmp_stub.cpp:87
Generated on Wed Feb 5 2025 10:57:21 for LLVM OpenMP by
1.9.6