[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 06:45:45 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);
> hans wrote:
> > 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
> `int a;
> I still can reproduce the issue when using gcc as test compiler after compiling the runtime with clang or vice versa.
https://reviews.llvm.org/D58506 casts the addresses to uintptr_t before expanding to 64 bit.
CHANGES SINCE LAST ACTION
More information about the Openmp-commits