[Bug libstdc++/91488] [9/10 Regression] char_traits::length causes "inlining failed in call to always_inline" error with -fgnu-tm -O2 -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91488 Jonathan Wakely changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #12 from Jonathan Wakely --- Fixed for 9.5, 10.4 and 11.2
[Bug libstdc++/91488] [9/10 Regression] char_traits::length causes "inlining failed in call to always_inline" error with -fgnu-tm -O2 -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91488 --- Comment #11 from CVS Commits --- The releases/gcc-9 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:cc44169fc7bc7552eb85f143f4fee9c8bcdd5e49 commit r9-9590-gcc44169fc7bc7552eb85f143f4fee9c8bcdd5e49 Author: Jonathan Wakely Date: Thu Jun 17 14:11:22 2021 +0100 libstdc++: Simplify constexpr checks in std::char_traits [PR 91488] This removes the 'static' keyword from the helper functions added by r8-1294 to detect whether the char_traits member functions can be evaluated at compile time. This prevents the "inlining failed" error reported in the PR. The new testcase from the PR is added to the libitm testsuite, because that's where we can be sure it's OK to use the -fgnu-tm option. Signed-off-by: Jonathan Wakely PR libstdc++/91488 libstdc++-v3/ChangeLog: * include/bits/char_traits.h (__constant_string_p) (__constant_array_p): Give external linkage. libitm/ChangeLog: * testsuite/libitm.c++/libstdc++-pr91488.C: New test. (cherry picked from commit b376b1ef38971b84975ad1540bf5d2ae0b924e76)
[Bug libstdc++/91488] [9/10 Regression] char_traits::length causes "inlining failed in call to always_inline" error with -fgnu-tm -O2 -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91488 --- Comment #10 from CVS Commits --- The releases/gcc-10 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:b7cf6b97fc3f6c02a5d0114fed14f40b08ab3ad8 commit r10-9932-gb7cf6b97fc3f6c02a5d0114fed14f40b08ab3ad8 Author: Jonathan Wakely Date: Thu Jun 17 14:11:22 2021 +0100 libstdc++: Simplify constexpr checks in std::char_traits [PR 91488] This removes the 'static' keyword from the helper functions added by r8-1294 to detect whether the char_traits member functions can be evaluated at compile time. This prevents the "inlining failed" error reported in the PR. The new testcase from the PR is added to the libitm testsuite, because that's where we can be sure it's OK to use the -fgnu-tm option. As a drive-by fix, the feature test macros for C++20 P0980R1 support are made to depend on whether __cpp_lib_is_constant_evaluated is defined. Signed-off-by: Jonathan Wakely PR libstdc++/91488 libstdc++-v3/ChangeLog: * include/bits/basic_string.h (__cpp_lib_constexpr_string): Only define C++20 value when std::is_constant_evaluated is available. * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits): Likewise. (__constant_string_p, __constant_array_p): Give external linkage. * include/std/version (__cpp_lib_constexpr_char_traits) (__cpp_lib_constexpr_string): Only define C++20 values when is_constant_evaluated is available. libitm/ChangeLog: * testsuite/libitm.c++/libstdc++-pr91488.C: New test. (cherry picked from commit b376b1ef38971b84975ad1540bf5d2ae0b924e76)
[Bug libstdc++/91488] [9/10 Regression] char_traits::length causes "inlining failed in call to always_inline" error with -fgnu-tm -O2 -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91488 Martin Liška changed: What|Removed |Added Keywords||trans-mem Status|UNCONFIRMED |NEW Last reconfirmed||2020-01-27 CC||marxin at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from Martin Liška --- Confirmed.
[Bug libstdc++/91488] [9/10 Regression] char_traits::length causes "inlining failed in call to always_inline" error with -fgnu-tm -O2 -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91488 ensadc at mailnesia dot com changed: What|Removed |Added CC||ensadc at mailnesia dot com --- Comment #1 from ensadc at mailnesia dot com --- 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(); }
[Bug libstdc++/91488] [9/10 Regression] char_traits::length causes "inlining failed in call to always_inline" error with -fgnu-tm -O2 -std=c++17
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91488 Richard Biener changed: What|Removed |Added Target Milestone|--- |9.4