diff --git a/openmp/runtime/src/kmp.h b/openmp/runtime/src/kmp.h --- a/openmp/runtime/src/kmp.h +++ b/openmp/runtime/src/kmp.h @@ -2142,14 +2142,17 @@ // Compiler sends us this info: typedef struct kmp_depend_info { kmp_intptr_t base_addr; - size_t len; struct { + kmp_uint64 len : 61; bool in : 1; bool out : 1; bool mtx : 1; } flags; } kmp_depend_info_t; +static_assert(sizeof(kmp_depend_info_t) <= 2 * sizeof(uint64_t), + "KMP depend info type is larger than expected"); + // Internal structures to work with task dependencies: struct kmp_depnode_list { kmp_depnode_t *node; diff --git a/openmp/runtime/src/kmp_gsupport.cpp b/openmp/runtime/src/kmp_gsupport.cpp --- a/openmp/runtime/src/kmp_gsupport.cpp +++ b/openmp/runtime/src/kmp_gsupport.cpp @@ -1182,7 +1182,7 @@ for (size_t i = 0U; i < ndeps; i++) { dep_list[i].base_addr = (kmp_intptr_t)depend[2U + i]; - dep_list[i].len = 0U; + dep_list[i].flags.len = 0U; dep_list[i].flags.in = 1; dep_list[i].flags.out = (i < nout); }