Skip to content

Commit c59d58a

Browse files
hjelmnjsquyres
authored andcommitted
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]> (cherry picked from commit dfa8d3a)
1 parent 02165ce commit c59d58a

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-2014 Los Alamos National Security, LLC.
15+
* Copyright (c) 2010-2018 Los Alamos National Security, LLC.
1616
* All rights reserved.
1717
* $COPYRIGHT$
1818
*
@@ -155,7 +155,11 @@ static inline mca_btl_vader_hdr_t *vader_fifo_read (vader_fifo_t *fifo, struct m
155155

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

0 commit comments

Comments
 (0)