diff options
| author | Joachim Protze <protze@itc.rwth-aachen.de> | 2019-05-20 14:21:42 +0000 |
|---|---|---|
| committer | Joachim Protze <protze@itc.rwth-aachen.de> | 2019-05-20 14:21:42 +0000 |
| commit | 4109d5606e23a2d422e62aabff726f8e269c5b3e (patch) | |
| tree | f0c0d0007209541d27fc76e6f56692ca561088b0 /openmp/runtime/test | |
| parent | 48b8a4b5190d94a8ab2d2f28eb42e2f15f61ef3f (diff) | |
| download | bcm5719-llvm-4109d5606e23a2d422e62aabff726f8e269c5b3e.tar.gz bcm5719-llvm-4109d5606e23a2d422e62aabff726f8e269c5b3e.zip | |
[OpenMP][OMPT] Fix locking testcases for 32 bit architectures
https://reviews.llvm.org/D58454 did not fix the problem for a typical use
case of building LLVM with gcc or icc and then testing with the newly built
clang compiler.
The compilers do not agree on how to extend a 32-bit pointer to uint64, so
make the pointer unsigned first, before adjusting the size.
Patch by Joachim Protze
Differential Revision: https://reviews.llvm.org/D58506
llvm-svn: 361158
Diffstat (limited to 'openmp/runtime/test')
| -rw-r--r-- | openmp/runtime/test/ompt/synchronization/lock.c | 2 | ||||
| -rw-r--r-- | openmp/runtime/test/ompt/synchronization/nest_lock.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/openmp/runtime/test/ompt/synchronization/lock.c b/openmp/runtime/test/ompt/synchronization/lock.c index c62e65520ab..2a934ee855a 100644 --- a/openmp/runtime/test/ompt/synchronization/lock.c +++ b/openmp/runtime/test/ompt/synchronization/lock.c @@ -10,7 +10,7 @@ int main() print_ids(0); omp_lock_t lock; - printf("%" PRIu64 ": &lock: %" PRIu64 "\n", ompt_get_thread_data()->value, (ompt_wait_id_t) &lock); + printf("%" PRIu64 ": &lock: %" PRIu64 "\n", ompt_get_thread_data()->value, (ompt_wait_id_t)(uintptr_t) &lock); omp_init_lock(&lock); print_fuzzy_address(1); omp_set_lock(&lock); diff --git a/openmp/runtime/test/ompt/synchronization/nest_lock.c b/openmp/runtime/test/ompt/synchronization/nest_lock.c index 60c1a014918..159048e2e74 100644 --- a/openmp/runtime/test/ompt/synchronization/nest_lock.c +++ b/openmp/runtime/test/ompt/synchronization/nest_lock.c @@ -10,7 +10,7 @@ int main() print_ids(0); omp_nest_lock_t nest_lock; - printf("%" PRIu64 ": &nest_lock: %lli\n", ompt_get_thread_data()->value, (ompt_wait_id_t) &nest_lock); + printf("%" PRIu64 ": &nest_lock: %lli\n", ompt_get_thread_data()->value, (ompt_wait_id_t)(uintptr_t) &nest_lock); omp_init_nest_lock(&nest_lock); print_fuzzy_address(1); omp_set_nest_lock(&nest_lock); |

