public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/91488] [9/10/11/12 Regression] char_traits::length causes "inlining failed in call to always_inline" error with -fgnu-tm -O2 -std=c++17
Date: Thu, 17 Jun 2021 21:45:45 +0000	[thread overview]
Message-ID: <bug-91488-4-tA3C8lYpA3@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-91488-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91488

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:b376b1ef38971b84975ad1540bf5d2ae0b924e76

commit r12-1603-gb376b1ef38971b84975ad1540bf5d2ae0b924e76
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Jun 17 14:11:22 2021 +0100

    libstdc++: Simplify constexpr checks in std::char_traits [PR 91488]

    This removes the helper functions added by r8-1294 to detect whether the
    char_traits member functions can be evaluated at compile time. Instead,
    we can just use __builtin_constant_evaluated directly, which is well
    supported by non-GCC compilers by now.

    As a result, there is a chance that those members will no longer be
    usable in constant expressions when using old versions of non-GCC
    compilers. Make the relevant feature test macros depend on the
    availability of __builtin_constant_evaluated, so they are defined only
    when the feature is actualyl available.

    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 <jwakely@redhat.com>

            PR libstdc++/91488

    libstdc++-v3/ChangeLog:

            * include/bits/basic_string.h (__cpp_lib_constexpr_string): Only
            define when is_constant_evaluated is available.
            * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
            Likewise.
            (__constant_string_p, __constant_array_p): Remove.
            (char_traits): Use is_constant_evaluated directly.
            * include/std/version (__cpp_lib_constexpr_char_traits)
            (__cpp_lib_constexpr_string): Only define when
            is_constant_evaluated is available.

    libitm/ChangeLog:

            * testsuite/libitm.c++/libstdc++-pr91488.C: New test.

  parent reply	other threads:[~2021-06-17 21:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-91488-4@http.gcc.gnu.org/bugzilla/>
2020-11-16 22:03 ` [Bug libstdc++/91488] [9/10/11 " redi at gcc dot gnu.org
2021-01-14  8:19 ` rguenth at gcc dot gnu.org
2021-06-01  8:15 ` [Bug libstdc++/91488] [9/10/11/12 " rguenth at gcc dot gnu.org
2021-06-07  8:11 ` gustavo at ugr dot es
2021-06-07  8:14 ` gustavo at ugr dot es
2021-06-07  8:16 ` gustavo at ugr dot es
2021-06-17 21:45 ` cvs-commit at gcc dot gnu.org [this message]
2021-06-18 10:20 ` [Bug libstdc++/91488] [9/10/11 " cvs-commit at gcc dot gnu.org
2021-06-18 11:50 ` [Bug libstdc++/91488] [9/10 " cvs-commit at gcc dot gnu.org
2021-06-18 14:43 ` cvs-commit at gcc dot gnu.org
2021-06-18 14:45 ` redi at gcc dot gnu.org

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=bug-91488-4-tA3C8lYpA3@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).