arch/x86/include/asm/rmwcc.h:23:17: error: jump into statement expression

From: kbuild test robot
Date: Tue Oct 30 2018 - 23:23:16 EST


Hi Peter,

FYI, the error/warning still remains.

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 310c7585e8300ddc46211df0757c11e4299ec482
commit: 7aa54be2976550f17c11a1c3e3630002dea39303 locking/qspinlock, x86: Provide liveness guarantee
date: 2 weeks ago
config: x86_64-randconfig-j0-10290909 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
git checkout 7aa54be2976550f17c11a1c3e3630002dea39303
# save the attached .config to linux build tree
make ARCH=x86_64

All errors (new ones prefixed by >>):

In file included from arch/x86/include/asm/atomic.h:5:0,
from include/linux/atomic.h:7,
from include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets.c:9:
arch/x86/include/asm/qspinlock.h: In function 'queued_fetch_set_pending_acquire':
>> arch/x86/include/asm/rmwcc.h:23:17: error: jump into statement expression
: clobbers : cc_label); \
^
include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^
arch/x86/include/asm/qspinlock.h:18:2: note: in expansion of macro 'if'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
arch/x86/include/asm/rmwcc.h:21:2: note: in expansion of macro 'asm_volatile_goto'
asm_volatile_goto (fullop "; j" #cc " %l[cc_label]" \
^
arch/x86/include/asm/rmwcc.h:54:2: note: in expansion of macro '__GEN_RMWcc'
__GEN_RMWcc(op " %[val], " arg0, var, cc, \
^
arch/x86/include/asm/rmwcc.h:58:2: note: in expansion of macro 'GEN_BINARY_RMWcc_6'
GEN_BINARY_RMWcc_6(op, var, cc, vcon, val, "%[var]")
^
arch/x86/include/asm/rmwcc.h:9:30: note: in expansion of macro 'GEN_BINARY_RMWcc_5'
#define __RMWcc_CONCAT(a, b) a ## b
^
arch/x86/include/asm/rmwcc.h:10:28: note: in expansion of macro '__RMWcc_CONCAT'
#define RMWcc_CONCAT(a, b) __RMWcc_CONCAT(a, b)
^
arch/x86/include/asm/rmwcc.h:60:32: note: in expansion of macro 'RMWcc_CONCAT'
#define GEN_BINARY_RMWcc(X...) RMWcc_CONCAT(GEN_BINARY_RMWcc_, RMWcc_ARGS(X))(X)
^
arch/x86/include/asm/qspinlock.h:18:6: note: in expansion of macro 'GEN_BINARY_RMWcc'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
arch/x86/include/asm/rmwcc.h:25:1: note: label 'cc_label' defined here
cc_label: c = true; \
^
include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^
arch/x86/include/asm/qspinlock.h:18:2: note: in expansion of macro 'if'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
arch/x86/include/asm/rmwcc.h:54:2: note: in expansion of macro '__GEN_RMWcc'
__GEN_RMWcc(op " %[val], " arg0, var, cc, \
^
arch/x86/include/asm/rmwcc.h:58:2: note: in expansion of macro 'GEN_BINARY_RMWcc_6'
GEN_BINARY_RMWcc_6(op, var, cc, vcon, val, "%[var]")
^
arch/x86/include/asm/rmwcc.h:9:30: note: in expansion of macro 'GEN_BINARY_RMWcc_5'
#define __RMWcc_CONCAT(a, b) a ## b
^
arch/x86/include/asm/rmwcc.h:10:28: note: in expansion of macro '__RMWcc_CONCAT'
#define RMWcc_CONCAT(a, b) __RMWcc_CONCAT(a, b)
^
arch/x86/include/asm/rmwcc.h:60:32: note: in expansion of macro 'RMWcc_CONCAT'
#define GEN_BINARY_RMWcc(X...) RMWcc_CONCAT(GEN_BINARY_RMWcc_, RMWcc_ARGS(X))(X)
^
arch/x86/include/asm/qspinlock.h:18:6: note: in expansion of macro 'GEN_BINARY_RMWcc'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
>> arch/x86/include/asm/rmwcc.h:25:1: error: duplicate label 'cc_label'
cc_label: c = true; \
^
include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^
arch/x86/include/asm/qspinlock.h:18:2: note: in expansion of macro 'if'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
arch/x86/include/asm/rmwcc.h:54:2: note: in expansion of macro '__GEN_RMWcc'
__GEN_RMWcc(op " %[val], " arg0, var, cc, \
^
arch/x86/include/asm/rmwcc.h:58:2: note: in expansion of macro 'GEN_BINARY_RMWcc_6'
GEN_BINARY_RMWcc_6(op, var, cc, vcon, val, "%[var]")
^
arch/x86/include/asm/rmwcc.h:9:30: note: in expansion of macro 'GEN_BINARY_RMWcc_5'
#define __RMWcc_CONCAT(a, b) a ## b
^
arch/x86/include/asm/rmwcc.h:10:28: note: in expansion of macro '__RMWcc_CONCAT'
#define RMWcc_CONCAT(a, b) __RMWcc_CONCAT(a, b)
^
arch/x86/include/asm/rmwcc.h:60:32: note: in expansion of macro 'RMWcc_CONCAT'
#define GEN_BINARY_RMWcc(X...) RMWcc_CONCAT(GEN_BINARY_RMWcc_, RMWcc_ARGS(X))(X)
^
arch/x86/include/asm/qspinlock.h:18:6: note: in expansion of macro 'GEN_BINARY_RMWcc'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
arch/x86/include/asm/rmwcc.h:25:1: note: previous definition of 'cc_label' was here
cc_label: c = true; \
^
include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^
arch/x86/include/asm/qspinlock.h:18:2: note: in expansion of macro 'if'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
arch/x86/include/asm/rmwcc.h:54:2: note: in expansion of macro '__GEN_RMWcc'
__GEN_RMWcc(op " %[val], " arg0, var, cc, \
^
arch/x86/include/asm/rmwcc.h:58:2: note: in expansion of macro 'GEN_BINARY_RMWcc_6'
GEN_BINARY_RMWcc_6(op, var, cc, vcon, val, "%[var]")
^
arch/x86/include/asm/rmwcc.h:9:30: note: in expansion of macro 'GEN_BINARY_RMWcc_5'
#define __RMWcc_CONCAT(a, b) a ## b
^
arch/x86/include/asm/rmwcc.h:10:28: note: in expansion of macro '__RMWcc_CONCAT'
#define RMWcc_CONCAT(a, b) __RMWcc_CONCAT(a, b)
^
arch/x86/include/asm/rmwcc.h:60:32: note: in expansion of macro 'RMWcc_CONCAT'
#define GEN_BINARY_RMWcc(X...) RMWcc_CONCAT(GEN_BINARY_RMWcc_, RMWcc_ARGS(X))(X)
^
arch/x86/include/asm/qspinlock.h:18:6: note: in expansion of macro 'GEN_BINARY_RMWcc'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
>> arch/x86/include/asm/rmwcc.h:23:17: error: jump into statement expression
: clobbers : cc_label); \
^
include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
______r = !!(cond); \
^
arch/x86/include/asm/qspinlock.h:18:2: note: in expansion of macro 'if'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
arch/x86/include/asm/rmwcc.h:21:2: note: in expansion of macro 'asm_volatile_goto'
asm_volatile_goto (fullop "; j" #cc " %l[cc_label]" \
^
arch/x86/include/asm/rmwcc.h:54:2: note: in expansion of macro '__GEN_RMWcc'
__GEN_RMWcc(op " %[val], " arg0, var, cc, \
^
arch/x86/include/asm/rmwcc.h:58:2: note: in expansion of macro 'GEN_BINARY_RMWcc_6'
GEN_BINARY_RMWcc_6(op, var, cc, vcon, val, "%[var]")
^
arch/x86/include/asm/rmwcc.h:9:30: note: in expansion of macro 'GEN_BINARY_RMWcc_5'
#define __RMWcc_CONCAT(a, b) a ## b
^
arch/x86/include/asm/rmwcc.h:10:28: note: in expansion of macro '__RMWcc_CONCAT'
#define RMWcc_CONCAT(a, b) __RMWcc_CONCAT(a, b)
^
arch/x86/include/asm/rmwcc.h:60:32: note: in expansion of macro 'RMWcc_CONCAT'
#define GEN_BINARY_RMWcc(X...) RMWcc_CONCAT(GEN_BINARY_RMWcc_, RMWcc_ARGS(X))(X)
^
arch/x86/include/asm/qspinlock.h:18:6: note: in expansion of macro 'GEN_BINARY_RMWcc'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
arch/x86/include/asm/rmwcc.h:25:1: note: label 'cc_label' defined here
cc_label: c = true; \
^
include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^
arch/x86/include/asm/qspinlock.h:18:2: note: in expansion of macro 'if'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
arch/x86/include/asm/rmwcc.h:54:2: note: in expansion of macro '__GEN_RMWcc'
__GEN_RMWcc(op " %[val], " arg0, var, cc, \
^
arch/x86/include/asm/rmwcc.h:58:2: note: in expansion of macro 'GEN_BINARY_RMWcc_6'
GEN_BINARY_RMWcc_6(op, var, cc, vcon, val, "%[var]")
^
arch/x86/include/asm/rmwcc.h:9:30: note: in expansion of macro 'GEN_BINARY_RMWcc_5'
#define __RMWcc_CONCAT(a, b) a ## b
^
arch/x86/include/asm/rmwcc.h:10:28: note: in expansion of macro '__RMWcc_CONCAT'
#define RMWcc_CONCAT(a, b) __RMWcc_CONCAT(a, b)
^
arch/x86/include/asm/rmwcc.h:60:32: note: in expansion of macro 'RMWcc_CONCAT'
#define GEN_BINARY_RMWcc(X...) RMWcc_CONCAT(GEN_BINARY_RMWcc_, RMWcc_ARGS(X))(X)
^
arch/x86/include/asm/qspinlock.h:18:6: note: in expansion of macro 'GEN_BINARY_RMWcc'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
>> arch/x86/include/asm/rmwcc.h:25:1: error: duplicate label 'cc_label'
cc_label: c = true; \
^
include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
______r = !!(cond); \
^
arch/x86/include/asm/qspinlock.h:18:2: note: in expansion of macro 'if'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
arch/x86/include/asm/rmwcc.h:54:2: note: in expansion of macro '__GEN_RMWcc'
__GEN_RMWcc(op " %[val], " arg0, var, cc, \
^
arch/x86/include/asm/rmwcc.h:58:2: note: in expansion of macro 'GEN_BINARY_RMWcc_6'
GEN_BINARY_RMWcc_6(op, var, cc, vcon, val, "%[var]")
^
arch/x86/include/asm/rmwcc.h:9:30: note: in expansion of macro 'GEN_BINARY_RMWcc_5'
#define __RMWcc_CONCAT(a, b) a ## b
^
arch/x86/include/asm/rmwcc.h:10:28: note: in expansion of macro '__RMWcc_CONCAT'
#define RMWcc_CONCAT(a, b) __RMWcc_CONCAT(a, b)
^
arch/x86/include/asm/rmwcc.h:60:32: note: in expansion of macro 'RMWcc_CONCAT'
#define GEN_BINARY_RMWcc(X...) RMWcc_CONCAT(GEN_BINARY_RMWcc_, RMWcc_ARGS(X))(X)
^
arch/x86/include/asm/qspinlock.h:18:6: note: in expansion of macro 'GEN_BINARY_RMWcc'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
arch/x86/include/asm/rmwcc.h:25:1: note: previous definition of 'cc_label' was here
cc_label: c = true; \
^
include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
if (__builtin_constant_p(!!(cond)) ? !!(cond) : \
^
arch/x86/include/asm/qspinlock.h:18:2: note: in expansion of macro 'if'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
arch/x86/include/asm/rmwcc.h:54:2: note: in expansion of macro '__GEN_RMWcc'
__GEN_RMWcc(op " %[val], " arg0, var, cc, \
^
arch/x86/include/asm/rmwcc.h:58:2: note: in expansion of macro 'GEN_BINARY_RMWcc_6'
GEN_BINARY_RMWcc_6(op, var, cc, vcon, val, "%[var]")
^
arch/x86/include/asm/rmwcc.h:9:30: note: in expansion of macro 'GEN_BINARY_RMWcc_5'
#define __RMWcc_CONCAT(a, b) a ## b
^
arch/x86/include/asm/rmwcc.h:10:28: note: in expansion of macro '__RMWcc_CONCAT'
#define RMWcc_CONCAT(a, b) __RMWcc_CONCAT(a, b)
^
arch/x86/include/asm/rmwcc.h:60:32: note: in expansion of macro 'RMWcc_CONCAT'
#define GEN_BINARY_RMWcc(X...) RMWcc_CONCAT(GEN_BINARY_RMWcc_, RMWcc_ARGS(X))(X)
^
arch/x86/include/asm/qspinlock.h:18:6: note: in expansion of macro 'GEN_BINARY_RMWcc'
if (GEN_BINARY_RMWcc(LOCK_PREFIX "btsl", lock->val.counter, c,
^
make[2]: *** [arch/x86/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [sub-make] Error 2

vim +23 arch/x86/include/asm/rmwcc.h

288e4521 Peter Zijlstra 2018-10-03 8
288e4521 Peter Zijlstra 2018-10-03 9 #define __RMWcc_CONCAT(a, b) a ## b
288e4521 Peter Zijlstra 2018-10-03 @10 #define RMWcc_CONCAT(a, b) __RMWcc_CONCAT(a, b)
288e4521 Peter Zijlstra 2018-10-03 11
700b7c54 Jan Beulich 2018-02-19 12 #define __CLOBBERS_MEM(clb...) "memory", ## clb
df340524 Kees Cook 2017-07-24 13
ba741e35 H. Peter Anvin 2016-06-08 14 #if !defined(__GCC_ASM_FLAG_OUTPUTS__) && defined(CC_HAVE_ASM_GOTO)
ba741e35 H. Peter Anvin 2016-06-08 15
ba741e35 H. Peter Anvin 2016-06-08 16 /* Use asm goto */
0c44c2d0 Peter Zijlstra 2013-09-11 17
288e4521 Peter Zijlstra 2018-10-03 18 #define __GEN_RMWcc(fullop, _var, cc, clobbers, ...) \
288e4521 Peter Zijlstra 2018-10-03 19 ({ \
288e4521 Peter Zijlstra 2018-10-03 20 bool c = false; \
18fe5822 H. Peter Anvin 2016-06-08 21 asm_volatile_goto (fullop "; j" #cc " %l[cc_label]" \
288e4521 Peter Zijlstra 2018-10-03 22 : : [var] "m" (_var), ## __VA_ARGS__ \
df340524 Kees Cook 2017-07-24 @23 : clobbers : cc_label); \
288e4521 Peter Zijlstra 2018-10-03 24 if (0) { \
288e4521 Peter Zijlstra 2018-10-03 @25 cc_label: c = true; \
288e4521 Peter Zijlstra 2018-10-03 26 } \
288e4521 Peter Zijlstra 2018-10-03 27 c; \
288e4521 Peter Zijlstra 2018-10-03 28 })
0c44c2d0 Peter Zijlstra 2013-09-11 29

:::::: The code at line 23 was first introduced by commit
:::::: df3405245a8535d2f20bcbdbb615385671cd0792 x86/asm: Add suffix macro for GEN_*_RMWcc()

:::::: TO: Kees Cook <keescook@xxxxxxxxxxxx>
:::::: CC: Ingo Molnar <mingo@xxxxxxxxxx>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: application/gzip