Skip to content

Commit 3f3ec63

Browse files
authored
Merge pull request #8325 from jjhursey/fix-pgi-rdma
Fix PGI compiler error with compare arg
2 parents d2311e9 + 185a459 commit 3f3ec63

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ompi/mca/osc/rdma/osc_rdma_frag.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* Copyright (c) 2012 Sandia National Laboratories. All rights reserved.
44
* Copyright (c) 2014-2018 Los Alamos National Security, LLC. All rights
55
* reserved.
6+
* Copyright (c) 2020 IBM Corporation. All rights reserved.
67
* $COPYRIGHT$
78
*
89
* Additional copyrights may follow
@@ -50,6 +51,7 @@ static inline int ompi_osc_rdma_frag_alloc (ompi_osc_rdma_module_t *module, size
5051

5152
if (NULL == curr) {
5253
opal_free_list_item_t *item = NULL;
54+
void *_tmp_ptr = NULL;
5355

5456
item = opal_free_list_get (&mca_osc_rdma_component.frags);
5557
if (OPAL_UNLIKELY(NULL == item)) {
@@ -72,7 +74,7 @@ static inline int ompi_osc_rdma_frag_alloc (ompi_osc_rdma_module_t *module, size
7274
}
7375
}
7476

75-
if (!opal_atomic_compare_exchange_strong_ptr ((opal_atomic_intptr_t *) &module->rdma_frag, &(intptr_t){0}, (intptr_t) curr)) {
77+
if (!opal_atomic_compare_exchange_strong_ptr ((opal_atomic_intptr_t *) &module->rdma_frag, (intptr_t *) &_tmp_ptr, (intptr_t) curr)) {
7678
ompi_osc_rdma_deregister (module, curr->handle);
7779
curr->handle = NULL;
7880

0 commit comments

Comments
 (0)