param_test.c:1156:10: error: address argument to atomic operation must be a pointer to _Atomic type ('intptr_t *' (aka 'long *') invalid)

From: kernel test robot
Date: Thu Aug 12 2021 - 18:20:09 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f8fbb47c6e86c0b75f8df864db702c3e3f757361
commit: f166b111e0491486fca0d105f09655ab718bd1c8 rseq/selftests: Test MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ
date: 11 months ago
config: x86_64-randconfig-r031-20210811 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project d39ebdae674c8efc84ebe8dc32716ec353220530)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f166b111e0491486fca0d105f09655ab718bd1c8
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout f166b111e0491486fca0d105f09655ab718bd1c8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> param_test.c:1156:10: error: address argument to atomic operation must be a pointer to _Atomic type ('intptr_t *' (aka 'long *') invalid)
while (!atomic_load(&args->percpu_list_ptr)) {}
^ ~~~~~~~~~~~~~~~~~~~~~~
/opt/cross/clang-767496d19c/lib/clang/14.0.0/include/stdatomic.h:120:29: note: expanded from macro 'atomic_load'
#define atomic_load(object) __c11_atomic_load(object, __ATOMIC_SEQ_CST)
^ ~~~~~~
param_test.c:1228:2: error: address argument to atomic operation must be a pointer to _Atomic type ('intptr_t *' (aka 'long *') invalid)
atomic_store(&args->percpu_list_ptr, (intptr_t)&list_a);
^ ~~~~~~~~~~~~~~~~~~~~~~
/opt/cross/clang-767496d19c/lib/clang/14.0.0/include/stdatomic.h:117:39: note: expanded from macro 'atomic_store'
#define atomic_store(object, desired) __c11_atomic_store(object, desired, __ATOMIC_SEQ_CST)
^ ~~~~~~
>> param_test.c:1230:10: error: address argument to atomic operation must be a pointer to _Atomic type ('int *' invalid)
while (!atomic_load(&args->stop)) {
^ ~~~~~~~~~~~
/opt/cross/clang-767496d19c/lib/clang/14.0.0/include/stdatomic.h:120:29: note: expanded from macro 'atomic_load'
#define atomic_load(object) __c11_atomic_load(object, __ATOMIC_SEQ_CST)
^ ~~~~~~
param_test.c:1237:19: error: address argument to atomic operation must be a pointer to _Atomic type ('intptr_t *' (aka 'long *') invalid)
if (expect_b != atomic_load(&list_b.c[cpu_b].head->data)) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/cross/clang-767496d19c/lib/clang/14.0.0/include/stdatomic.h:120:29: note: expanded from macro 'atomic_load'
#define atomic_load(object) __c11_atomic_load(object, __ATOMIC_SEQ_CST)
^ ~~~~~~
param_test.c:1243:3: error: address argument to atomic operation must be a pointer to _Atomic type ('intptr_t *' (aka 'long *') invalid)
atomic_store(&args->percpu_list_ptr, (intptr_t)&list_b);
^ ~~~~~~~~~~~~~~~~~~~~~~
/opt/cross/clang-767496d19c/lib/clang/14.0.0/include/stdatomic.h:117:39: note: expanded from macro 'atomic_store'
#define atomic_store(object, desired) __c11_atomic_store(object, desired, __ATOMIC_SEQ_CST)
^ ~~~~~~
param_test.c:1254:14: error: address argument to atomic operation must be a pointer to _Atomic type ('intptr_t *' (aka 'long *') invalid)
expect_a = atomic_load(&list_a.c[cpu_a].head->data);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/cross/clang-767496d19c/lib/clang/14.0.0/include/stdatomic.h:120:29: note: expanded from macro 'atomic_load'
#define atomic_load(object) __c11_atomic_load(object, __ATOMIC_SEQ_CST)
^ ~~~~~~
param_test.c:1261:19: error: address argument to atomic operation must be a pointer to _Atomic type ('intptr_t *' (aka 'long *') invalid)
if (expect_a != atomic_load(&list_a.c[cpu_a].head->data)) {
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/cross/clang-767496d19c/lib/clang/14.0.0/include/stdatomic.h:120:29: note: expanded from macro 'atomic_load'
#define atomic_load(object) __c11_atomic_load(object, __ATOMIC_SEQ_CST)
^ ~~~~~~
param_test.c:1267:3: error: address argument to atomic operation must be a pointer to _Atomic type ('intptr_t *' (aka 'long *') invalid)
atomic_store(&args->percpu_list_ptr, (intptr_t)&list_a);
^ ~~~~~~~~~~~~~~~~~~~~~~
/opt/cross/clang-767496d19c/lib/clang/14.0.0/include/stdatomic.h:117:39: note: expanded from macro 'atomic_store'
#define atomic_store(object, desired) __c11_atomic_store(object, desired, __ATOMIC_SEQ_CST)
^ ~~~~~~
param_test.c:1275:14: error: address argument to atomic operation must be a pointer to _Atomic type ('intptr_t *' (aka 'long *') invalid)
expect_b = atomic_load(&list_b.c[cpu_b].head->data);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/cross/clang-767496d19c/lib/clang/14.0.0/include/stdatomic.h:120:29: note: expanded from macro 'atomic_load'
#define atomic_load(object) __c11_atomic_load(object, __ATOMIC_SEQ_CST)
^ ~~~~~~
param_test.c:1334:2: error: address argument to atomic operation must be a pointer to _Atomic type ('int *' invalid)
atomic_store(&thread_args.stop, 1);
^ ~~~~~~~~~~~~~~~~~
/opt/cross/clang-767496d19c/lib/clang/14.0.0/include/stdatomic.h:117:39: note: expanded from macro 'atomic_store'
#define atomic_store(object, desired) __c11_atomic_store(object, desired, __ATOMIC_SEQ_CST)
^ ~~~~~~
10 errors generated.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip