[Openmp-commits] [PATCH] D58454: [OpenMP][OMPT] Fix locking testcases for 32 bit architectures
Joachim Protze via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Feb 21 04:02:26 PST 2019
protze.joachim marked an inline comment as done.
protze.joachim added inline comments.
Comment at: runtime/test/ompt/synchronization/lock.c:13
- printf("%" PRIu64 ": &lock: %" PRIu64 "\n", ompt_get_thread_data()->value, (uint64_t) &lock);
+ printf("%" PRIu64 ": &lock: %" PRIu64 "\n", ompt_get_thread_data()->value, (ompt_wait_id_t) &lock);
> I don't know this code at all obviously, but will this work with the PRIu64 conversion specifier? If ompt_wait_id_t is 32-bit on 32-bit platforms, this sounds like it wouldn't match?
ompt_wait_id_t is defined to be 64 bit by the OpenMP spec.
The problem is the expansion to 64 bit in the cast.
gcc and clang seem to have a different idea of what should be the result on 32 bit arch for
I still can reproduce the issue when using gcc as test compiler after compiling the runtime with clang or vice versa.
CHANGES SINCE LAST ACTION
More information about the Openmp-commits