Skip to content

Commit dfa8d3a

Browse files
committed
btl/vader: work around Oracle compiler bug
This commit works around an Oracle C compiler bug in 5.15 (not sure when it was introduced). The bug is triggered when we chain assignments of atomic variables. Ex: _Atomic intptr x, y; intptr_t z = 0; x = y = z; Will produce a compiler error of the form: operand cannot have void type: op "=" assignment type mismatch: long "=" void To work around the issue we are removing the chain assignment and setting the head and tail on different lines. Fixes #5814 Signed-off-by: Nathan Hjelm <[email protected]>
1 parent 66a7dc4 commit dfa8d3a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

opal/mca/btl/vader/btl_vader_fifo.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* All rights reserved.
1313
* Copyright (c) 2006-2007 Voltaire. All rights reserved.
1414
* Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved.
15-
* Copyright (c) 2010-2017 Los Alamos National Security, LLC.
15+
* Copyright (c) 2010-2018 Los Alamos National Security, LLC.
1616
* All rights reserved.
1717
* $COPYRIGHT$
1818
*
@@ -154,7 +154,11 @@ static inline mca_btl_vader_hdr_t *vader_fifo_read (vader_fifo_t *fifo, struct m
154154

155155
static inline void vader_fifo_init (vader_fifo_t *fifo)
156156
{
157-
fifo->fifo_head = fifo->fifo_tail = VADER_FIFO_FREE;
157+
/* due to a compiler bug in Oracle C 5.15 the following line was broken into two. Not
158+
* ideal but oh well. See #5814 */
159+
/* fifo->fifo_head = fifo->fifo_tail = VADER_FIFO_FREE; */
160+
fifo->fifo_head = VADER_FIFO_FREE;
161+
fifo->fifo_tail = VADER_FIFO_FREE;
158162
fifo->fbox_available = mca_btl_vader_component.fbox_max;
159163
mca_btl_vader_component.my_fifo = fifo;
160164
}

0 commit comments

Comments
 (0)