From: kernel test robot <lkp@intel.com>
To: Jim Cromie <jim.cromie@gmail.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [jimc:maph 1/1] lib/test_map_h.c:43:2: error: call to '__compiletime_assert_318' declared with 'error' attribute: BUILD_BUG_ON failed: __builtin_memcmp(caten, "YESNOMAYBE", sizeof("YESNOMAYBE"))
Date: Sun, 26 Mar 2023 06:12:39 +0800 [thread overview]
Message-ID: <202303260659.ObaIESij-lkp@intel.com> (raw)
tree: https://github.com/jimc/linux.git maph
head: a43c9ca75a0027cb9ece5c55b2287bb682e55416
commit: a43c9ca75a0027cb9ece5c55b2287bb682e55416 [1/1] include/linux/map.h: add new header, test it with test_map_h.c (RFC)
config: mips-randconfig-c004-20230322 (https://download.01.org/0day-ci/archive/20230326/202303260659.ObaIESij-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 67409911353323ca5edf2049ef0df54132fa1ca7)
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
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/jimc/linux/commit/a43c9ca75a0027cb9ece5c55b2287bb682e55416
git remote add jimc https://github.com/jimc/linux.git
git fetch --no-tags jimc maph
git checkout a43c9ca75a0027cb9ece5c55b2287bb682e55416
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202303260659.ObaIESij-lkp@intel.com/
All errors (new ones prefixed by >>):
>> lib/test_map_h.c:43:2: error: call to '__compiletime_assert_318' declared with 'error' attribute: BUILD_BUG_ON failed: __builtin_memcmp(caten, "YESNOMAYBE", sizeof("YESNOMAYBE"))
BUILD_BUG_STREQ(caten, "YESNOMAYBE");
^
lib/test_map_h.c:28:2: note: expanded from macro 'BUILD_BUG_STREQ'
BUILD_BUG_ON(__builtin_memcmp(_var, ref, sizeof(ref))); \
^
include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^
include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:385:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:378:4: note: expanded from macro '__compiletime_assert'
prefix ## suffix(); \
^
<scratch space>:102:1: note: expanded from here
__compiletime_assert_318
^
>> lib/test_map_h.c:43:2: error: call to '__compiletime_assert_319' declared with 'error' attribute: BUILD_BUG_ON failed: __builtin_memcmp(caten, "YESNOMAYBE", __builtin_strlen("YESNOMAYBE"))
lib/test_map_h.c:29:2: note: expanded from macro 'BUILD_BUG_STREQ'
BUILD_BUG_ON(__builtin_memcmp(_var, ref, __builtin_strlen(ref))); \
^
include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^
include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:385:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:378:4: note: expanded from macro '__compiletime_assert'
prefix ## suffix(); \
^
<scratch space>:106:1: note: expanded from here
__compiletime_assert_319
^
lib/test_map_h.c:45:2: error: call to '__compiletime_assert_320' declared with 'error' attribute: BUILD_BUG_ON failed: __builtin_memcmp(debug_cats_slist[0], "DRMx_CORE", sizeof("DRMx_CORE"))
BUILD_BUG_STREQ_I(debug_cats, 0, "DRMx_CORE");
^
lib/test_map_h.c:33:2: note: expanded from macro 'BUILD_BUG_STREQ_I'
BUILD_BUG_STREQ(_var##_slist[idx], ref)
^
lib/test_map_h.c:28:2: note: expanded from macro 'BUILD_BUG_STREQ'
BUILD_BUG_ON(__builtin_memcmp(_var, ref, sizeof(ref))); \
^
include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:385:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:378:4: note: expanded from macro '__compiletime_assert'
prefix ## suffix(); \
^
<scratch space>:111:1: note: expanded from here
__compiletime_assert_320
^
lib/test_map_h.c:45:2: error: call to '__compiletime_assert_321' declared with 'error' attribute: BUILD_BUG_ON failed: __builtin_memcmp(debug_cats_slist[0], "DRMx_CORE", __builtin_strlen("DRMx_CORE"))
lib/test_map_h.c:33:2: note: expanded from macro 'BUILD_BUG_STREQ_I'
BUILD_BUG_STREQ(_var##_slist[idx], ref)
^
lib/test_map_h.c:29:2: note: expanded from macro 'BUILD_BUG_STREQ'
BUILD_BUG_ON(__builtin_memcmp(_var, ref, __builtin_strlen(ref))); \
^
include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:385:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:378:4: note: expanded from macro '__compiletime_assert'
prefix ## suffix(); \
^
<scratch space>:115:1: note: expanded from here
__compiletime_assert_321
^
lib/test_map_h.c:46:2: error: call to '__compiletime_assert_322' declared with 'error' attribute: BUILD_BUG_ON failed: __builtin_memcmp(debug_cats_slist[1], "DRMx_DRIVER", sizeof("DRMx_DRIVER"))
BUILD_BUG_STREQ_I(debug_cats, 1, "DRMx_DRIVER");
^
lib/test_map_h.c:33:2: note: expanded from macro 'BUILD_BUG_STREQ_I'
BUILD_BUG_STREQ(_var##_slist[idx], ref)
^
lib/test_map_h.c:28:2: note: expanded from macro 'BUILD_BUG_STREQ'
BUILD_BUG_ON(__builtin_memcmp(_var, ref, sizeof(ref))); \
^
include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:385:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:378:4: note: expanded from macro '__compiletime_assert'
prefix ## suffix(); \
^
<scratch space>:120:1: note: expanded from here
__compiletime_assert_322
^
lib/test_map_h.c:46:2: error: call to '__compiletime_assert_323' declared with 'error' attribute: BUILD_BUG_ON failed: __builtin_memcmp(debug_cats_slist[1], "DRMx_DRIVER", __builtin_strlen("DRMx_DRIVER"))
lib/test_map_h.c:33:2: note: expanded from macro 'BUILD_BUG_STREQ_I'
BUILD_BUG_STREQ(_var##_slist[idx], ref)
^
lib/test_map_h.c:29:2: note: expanded from macro 'BUILD_BUG_STREQ'
BUILD_BUG_ON(__builtin_memcmp(_var, ref, __builtin_strlen(ref))); \
^
include/linux/build_bug.h:50:2: note: expanded from macro 'BUILD_BUG_ON'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^
note: (skipping 2 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:385:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:378:4: note: expanded from macro '__compiletime_assert'
prefix ## suffix(); \
^
vim +43 lib/test_map_h.c
38
39 /* force compile, though its not called */
40 static void __used MAPH_BUILD_BUG(void)
41 {
42 BUILD_BUG_ON(sum != 6);
> 43 BUILD_BUG_STREQ(caten, "YESNOMAYBE");
44
45 BUILD_BUG_STREQ_I(debug_cats, 0, "DRMx_CORE");
46 BUILD_BUG_STREQ_I(debug_cats, 1, "DRMx_DRIVER");
47 BUILD_BUG_STREQ_I(debug_cats, 2, "DRMx_KMS");
48
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
reply other threads:[~2023-03-25 22:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202303260659.ObaIESij-lkp@intel.com \
--to=lkp@intel.com \
--cc=jim.cromie@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.