[openmp] [test] Fix data structure mismatches for tests that define kmp_depend_info
Use the correct data type for pointer sized integers on Windows; "long" is always 32 bit, even on 64 bit Windows - don't use it for the kmp_intptr_t type. Provide the exact correct definition of the kmp_depend_info struct - avoid the risk of mismatches (if a platform would pack things slightly differently when things are declared differently). Zero initialize the whole dep_info struct before filling it in; if only setting the in/out bits, the rest of the unallocated bits in the bitfield can have undefined values. Libomp reads the flags in combined form as an kmp_uint8 by reading the flag field - thus, the unused bits do need to be zeroed. (Alternatively, the flag field could be set to zero before setting the individual bits in the bitfield). Use kmp_intptr_t instead of long for casting pointers to integers. Differential Revision: https://reviews.llvm.org/D137748
Loading
Please sign in to comment