2022-06-22 18:08:09

by kernel test robot

[permalink] [raw]
Subject: [norov:fns 7/19] include/linux/compiler_types.h:352:45: error: call to '__compiletime_assert_600' declared with attribute error: BUILD_BUG_ON failed: !__builtin_constant_p(res)

tree: https://github.com/norov/linux fns
head: dc85542660535a9072c3b98819f4b80ff182b92a
commit: 2f52f0373b1a1bcf54a4aedc202518f6bed4c74f [7/19] lib: test_bitmap: add compile-time optimization/evaluations assertions
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220623/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/norov/linux/commit/2f52f0373b1a1bcf54a4aedc202518f6bed4c74f
git remote add norov https://github.com/norov/linux
git fetch --no-tags norov fns
git checkout 2f52f0373b1a1bcf54a4aedc202518f6bed4c74f
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

In file included from <command-line>:
lib/test_bitmap.c: In function 'test_bitmap_const_eval':
>> include/linux/compiler_types.h:352:45: error: call to '__compiletime_assert_600' declared with attribute error: BUILD_BUG_ON failed: !__builtin_constant_p(res)
352 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
include/linux/compiler_types.h:333:25: note: in definition of macro '__compiletime_assert'
333 | prefix ## suffix(); \
| ^~~~~~
include/linux/compiler_types.h:352:9: note: in expansion of macro '_compiletime_assert'
352 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
lib/test_bitmap.c:904:9: note: in expansion of macro 'BUILD_BUG_ON'
904 | BUILD_BUG_ON(!__builtin_constant_p(res));
| ^~~~~~~~~~~~


vim +/__compiletime_assert_600 +352 include/linux/compiler_types.h

eb5c2d4b45e3d2d Will Deacon 2020-07-21 338
eb5c2d4b45e3d2d Will Deacon 2020-07-21 339 #define _compiletime_assert(condition, msg, prefix, suffix) \
eb5c2d4b45e3d2d Will Deacon 2020-07-21 340 __compiletime_assert(condition, msg, prefix, suffix)
eb5c2d4b45e3d2d Will Deacon 2020-07-21 341
eb5c2d4b45e3d2d Will Deacon 2020-07-21 342 /**
eb5c2d4b45e3d2d Will Deacon 2020-07-21 343 * compiletime_assert - break build and emit msg if condition is false
eb5c2d4b45e3d2d Will Deacon 2020-07-21 344 * @condition: a compile-time constant condition to check
eb5c2d4b45e3d2d Will Deacon 2020-07-21 345 * @msg: a message to emit if condition is false
eb5c2d4b45e3d2d Will Deacon 2020-07-21 346 *
eb5c2d4b45e3d2d Will Deacon 2020-07-21 347 * In tradition of POSIX assert, this macro will break the build if the
eb5c2d4b45e3d2d Will Deacon 2020-07-21 348 * supplied condition is *false*, emitting the supplied error message if the
eb5c2d4b45e3d2d Will Deacon 2020-07-21 349 * compiler has support to do so.
eb5c2d4b45e3d2d Will Deacon 2020-07-21 350 */
eb5c2d4b45e3d2d Will Deacon 2020-07-21 351 #define compiletime_assert(condition, msg) \
eb5c2d4b45e3d2d Will Deacon 2020-07-21 @352 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
eb5c2d4b45e3d2d Will Deacon 2020-07-21 353

:::::: The code at line 352 was first introduced by commit
:::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h

:::::: TO: Will Deacon <[email protected]>
:::::: CC: Will Deacon <[email protected]>

--
0-DAY CI Kernel Test Service
https://01.org/lkp


2022-06-23 11:33:59

by Alexander Lobakin

[permalink] [raw]
Subject: Re: [norov:fns 7/19] include/linux/compiler_types.h:352:45: error: call to '__compiletime_assert_600' declared with attribute error: BUILD_BUG_ON failed: !__builtin_constant_p(res)

From: kernel test robot <[email protected]>
Date: Thu, 23 Jun 2022 01:16:29 +0800

Hi Yury,

> tree: https://github.com/norov/linux fns
> head: dc85542660535a9072c3b98819f4b80ff182b92a
> commit: 2f52f0373b1a1bcf54a4aedc202518f6bed4c74f [7/19] lib: test_bitmap: add compile-time optimization/evaluations assertions
> config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220623/[email protected]/config)
> compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
> reproduce (this is a W=1 build):
> # https://github.com/norov/linux/commit/2f52f0373b1a1bcf54a4aedc202518f6bed4c74f
> git remote add norov https://github.com/norov/linux
> git fetch --no-tags norov fns
> git checkout 2f52f0373b1a1bcf54a4aedc202518f6bed4c74f
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash

Can't reproduce it at all on x86_64 with the attached config, were
there any other changes maybe that could cause this?

>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <[email protected]>
>
> All errors (new ones prefixed by >>):
>
> In file included from <command-line>:
> lib/test_bitmap.c: In function 'test_bitmap_const_eval':
> >> include/linux/compiler_types.h:352:45: error: call to '__compiletime_assert_600' declared with attribute error: BUILD_BUG_ON failed: !__builtin_constant_p(res)
> 352 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> | ^
> include/linux/compiler_types.h:333:25: note: in definition of macro '__compiletime_assert'
> 333 | prefix ## suffix(); \
> | ^~~~~~
> include/linux/compiler_types.h:352:9: note: in expansion of macro '_compiletime_assert'
> 352 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> | ^~~~~~~~~~~~~~~~~~~
> include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
> 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
> | ^~~~~~~~~~~~~~~~~~
> include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
> 50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
> | ^~~~~~~~~~~~~~~~
> lib/test_bitmap.c:904:9: note: in expansion of macro 'BUILD_BUG_ON'
> 904 | BUILD_BUG_ON(!__builtin_constant_p(res));
> | ^~~~~~~~~~~~
>
>
> vim +/__compiletime_assert_600 +352 include/linux/compiler_types.h
>
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 338
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 339 #define _compiletime_assert(condition, msg, prefix, suffix) \
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 340 __compiletime_assert(condition, msg, prefix, suffix)
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 341
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 342 /**
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 343 * compiletime_assert - break build and emit msg if condition is false
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 344 * @condition: a compile-time constant condition to check
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 345 * @msg: a message to emit if condition is false
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 346 *
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 347 * In tradition of POSIX assert, this macro will break the build if the
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 348 * supplied condition is *false*, emitting the supplied error message if the
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 349 * compiler has support to do so.
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 350 */
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 351 #define compiletime_assert(condition, msg) \
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 @352 _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
> eb5c2d4b45e3d2d Will Deacon 2020-07-21 353
>
> :::::: The code at line 352 was first introduced by commit
> :::::: eb5c2d4b45e3d2d5d052ea6b8f1463976b1020d5 compiler.h: Move compiletime_assert() macros into compiler_types.h
>
> :::::: TO: Will Deacon <[email protected]>
> :::::: CC: Will Deacon <[email protected]>
>
> --
> 0-DAY CI Kernel Test Service
> https://01.org/lkp

Thanks,
Olek

2022-06-23 18:56:53

by Yury Norov

[permalink] [raw]
Subject: Re: [norov:fns 7/19] include/linux/compiler_types.h:352:45: error: call to '__compiletime_assert_600' declared with attribute error: BUILD_BUG_ON failed: !__builtin_constant_p(res)

On Thu, Jun 23, 2022 at 01:08:20PM +0200, Alexander Lobakin wrote:
> From: kernel test robot <[email protected]>
> Date: Thu, 23 Jun 2022 01:16:29 +0800
>
> Hi Yury,
>
> > tree: https://github.com/norov/linux fns
> > head: dc85542660535a9072c3b98819f4b80ff182b92a
> > commit: 2f52f0373b1a1bcf54a4aedc202518f6bed4c74f [7/19] lib: test_bitmap: add compile-time optimization/evaluations assertions
> > config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220623/[email protected]/config)
> > compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
> > reproduce (this is a W=1 build):
> > # https://github.com/norov/linux/commit/2f52f0373b1a1bcf54a4aedc202518f6bed4c74f
> > git remote add norov https://github.com/norov/linux
> > git fetch --no-tags norov fns
> > git checkout 2f52f0373b1a1bcf54a4aedc202518f6bed4c74f
> > # save the config file
> > mkdir build_dir && cp config build_dir/.config
> > make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
>
> Can't reproduce it at all on x86_64 with the attached config, were
> there any other changes maybe that could cause this?

This is my working branch, and it shouldn't be that loud. But
anyways...

There are some patches on top of your series. This is my
work-in-progress. If you think it's not relevant, please ignore
this.

Thanks,
Yury

2022-06-27 05:05:57

by Chen, Rong A

[permalink] [raw]
Subject: Re: [kbuild-all] Re: [norov:fns 7/19] include/linux/compiler_types.h:352:45: error: call to '__compiletime_assert_600' declared with attribute error: BUILD_BUG_ON failed: !__builtin_constant_p(res)



On 6/24/2022 1:01 AM, Yury Norov wrote:
> On Thu, Jun 23, 2022 at 01:08:20PM +0200, Alexander Lobakin wrote:
>> From: kernel test robot <[email protected]>
>> Date: Thu, 23 Jun 2022 01:16:29 +0800
>>
>> Hi Yury,
>>
>>> tree: https://github.com/norov/linux fns
>>> head: dc85542660535a9072c3b98819f4b80ff182b92a
>>> commit: 2f52f0373b1a1bcf54a4aedc202518f6bed4c74f [7/19] lib: test_bitmap: add compile-time optimization/evaluations assertions
>>> config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20220623/[email protected]/config)
>>> compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
>>> reproduce (this is a W=1 build):
>>> # https://github.com/norov/linux/commit/2f52f0373b1a1bcf54a4aedc202518f6bed4c74f
>>> git remote add norov https://github.com/norov/linux
>>> git fetch --no-tags norov fns
>>> git checkout 2f52f0373b1a1bcf54a4aedc202518f6bed4c74f
>>> # save the config file
>>> mkdir build_dir && cp config build_dir/.config
>>> make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
>>
>> Can't reproduce it at all on x86_64 with the attached config, were
>> there any other changes maybe that could cause this?
>
> This is my working branch, and it shouldn't be that loud. But
> anyways...

Hi Yury,

Sorry for the inconvenience, we'll only send reports to you privately
in future.

Best Regards,
Rong Chen

>
> There are some patches on top of your series. This is my
> work-in-progress. If you think it's not relevant, please ignore
> this.
>
> Thanks,
> Yury
> _______________________________________________
> kbuild-all mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
>