[Openmp-commits] [openmp] 77c2b62 - [OpenMP][Tests] Sync struct DEP with the runtime (#69982)

via Openmp-commits openmp-commits at lists.llvm.org
Tue Oct 24 10:40:12 PDT 2023


Author: Ilya Leoshkevich
Date: 2023-10-24T19:40:08+02:00
New Revision: 77c2b623ca4ce10ec1019b31706a055aad2580cd

URL: https://github.com/llvm/llvm-project/commit/77c2b623ca4ce10ec1019b31706a055aad2580cd
DIFF: https://github.com/llvm/llvm-project/commit/77c2b623ca4ce10ec1019b31706a055aad2580cd.diff

LOG: [OpenMP][Tests] Sync struct DEP with the runtime (#69982)

struct DEP defined in multiple testcases must correspond to runtime's
struct kmp_depend_info. The former defines flags as int, and the latter
as kmp_uint8_t. This discrepancy goes unnoticed on little-endian
systems, but breaks big-endian ones.

Make flags in struct DEP unsigned char.

Added: 
    

Modified: 
    openmp/runtime/test/tasking/kmp_detach_tasks_t3.c
    openmp/runtime/test/tasking/kmp_taskwait_nowait.c
    openmp/runtime/test/tasking/omp50_task_depend_mtx.c
    openmp/runtime/test/tasking/omp50_task_depend_mtx2.c

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/test/tasking/kmp_detach_tasks_t3.c b/openmp/runtime/test/tasking/kmp_detach_tasks_t3.c
index e14bab60b1cfb86..bf41d94fcbbd824 100644
--- a/openmp/runtime/test/tasking/kmp_detach_tasks_t3.c
+++ b/openmp/runtime/test/tasking/kmp_detach_tasks_t3.c
@@ -56,7 +56,7 @@ typedef struct task {
 typedef struct DEP {
   size_t addr;
   size_t len;
-  int flags;
+  unsigned char flags;
 } dep;
 
 typedef int(* task_entry_t)( int, ptask );

diff  --git a/openmp/runtime/test/tasking/kmp_taskwait_nowait.c b/openmp/runtime/test/tasking/kmp_taskwait_nowait.c
index 809642aea2c4838..0353d62e322418c 100644
--- a/openmp/runtime/test/tasking/kmp_taskwait_nowait.c
+++ b/openmp/runtime/test/tasking/kmp_taskwait_nowait.c
@@ -11,7 +11,7 @@
 typedef struct DEP {
   size_t addr;
   size_t len;
-  int flags;
+  unsigned char flags;
 } _dep;
 typedef struct ID {
   int reserved_1;

diff  --git a/openmp/runtime/test/tasking/omp50_task_depend_mtx.c b/openmp/runtime/test/tasking/omp50_task_depend_mtx.c
index 79c270e94a7d814..e6cd7ff1d9d207c 100644
--- a/openmp/runtime/test/tasking/omp50_task_depend_mtx.c
+++ b/openmp/runtime/test/tasking/omp50_task_depend_mtx.c
@@ -37,7 +37,7 @@ typedef int(*entry_t)(int, int**);
 typedef struct DEP {
   size_t addr;
   size_t len;
-  int flags;
+  unsigned char flags;
 } dep;
 typedef struct ID {
   int reserved_1;

diff  --git a/openmp/runtime/test/tasking/omp50_task_depend_mtx2.c b/openmp/runtime/test/tasking/omp50_task_depend_mtx2.c
index ec8a7d1cab690de..cc0a3a190382426 100644
--- a/openmp/runtime/test/tasking/omp50_task_depend_mtx2.c
+++ b/openmp/runtime/test/tasking/omp50_task_depend_mtx2.c
@@ -37,7 +37,7 @@ typedef int(*entry_t)(int, int**);
 typedef struct DEP {
   size_t addr;
   size_t len;
-  int flags;
+  unsigned char flags;
 } dep;
 typedef struct ID {
   int reserved_1;


        


More information about the Openmp-commits mailing list