[Bug libstdc++/91488] [9/10/11 Regression] char_traits::length causes "inlining failed in call to always_inline" error with -fgnu-tm -O2 -std=c++17
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 16 22:03:05 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91488
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to ensadc from comment #1)
> It seems that the inliner does not like the `static` specifier in
> `__constant_string_p`. This also triggers "inlining failed in call to
> always_inline" error:
>
> static __attribute__((always_inline)) constexpr bool
> f()
> {
> return __builtin_is_constant_evaluated();
> }
>
> int main() {
> (void)f();
> }
That 'static' causes ODR violations, so I think we need to get rid of it
anyway.
More information about the Gcc-bugs
mailing list