Skip to content

Commit af6511d

Browse files
committed
[OpenMP] Fixed Bug 49356
Bug 49356 (https://bugs.llvm.org/show_bug.cgi?id=49356) reports crash in the test case `tasking/bug_taskwait_detach.cpp`, which is caused by the wrong function declaration. `gtid` in `__kmpc_omp_task` should be `kmp_int32`. Reviewed By: AndreyChurbanov Differential Revision: https://reviews.llvm.org/D102584
1 parent fded6f7 commit af6511d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

openmp/runtime/test/tasking/bug_taskwait_detach.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
#include <omp.h>
44

55
#include <chrono>
6+
#include <cstdint>
67
#include <iostream>
78
#include <thread>
89

910
// detached
1011
#define PTASK_FLAG_DETACHABLE 0x40
1112

1213
// OpenMP RTL interfaces
13-
typedef long long kmp_int64;
14+
using kmp_int32 = int32_t;
1415

1516
typedef struct ID {
1617
int reserved_1;
@@ -59,7 +60,8 @@ extern "C" {
5960
extern int __kmpc_global_thread_num(void *id_ref);
6061
extern int **__kmpc_omp_task_alloc(id *loc, int gtid, int flags, size_t sz,
6162
size_t shar, task_entry_t rtn);
62-
extern int __kmpc_omp_task(id *loc, kmp_int64 gtid, kmp_task_t *task);
63+
extern kmp_int32 __kmpc_omp_task(ident_t *loc_ref, kmp_int32 gtid,
64+
kmp_task_t *new_task);
6365
extern omp_event_handle_t __kmpc_task_allow_completion_event(ident_t *loc_ref,
6466
int gtid,
6567
kmp_task_t *task);

0 commit comments

Comments
 (0)