public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Stephan Bergmann <sbergman@redhat.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [committed] libstdc++: Avoid redundant checks in std::use_facet [PR103755]
Date: Sun, 13 Nov 2022 20:22:29 +0100	[thread overview]
Message-ID: <57ee8a3e-c7b4-54ee-9274-21e387a48037@redhat.com> (raw)
In-Reply-To: <CACb0b4nJ8AEjdgAQef3yoJ8jjW070EokVu7HZdVpreDUXSzOZg@mail.gmail.com>

On 11/12/22 03:47, Jonathan Wakely wrote:
> On Fri, 11 Nov 2022 at 21:00, Stephan Bergmann <sbergman@redhat.com> wrote:
>>
>> On 11/11/22 06:30, Jonathan Wakely via Gcc-patches wrote:
>>> As discussed in the PR, this makes it three times faster to construct
>>> iostreams objects.
>>>
>>> Tested x86_64-linux. Pushed to trunk.
>>
>> I haven't yet tried to track down what's going on, but with various
>> versions of Clang (e.g. clang-15.0.4-1.fc37.x86_64):
>>
>>> $ cat test.cc
>>> #include <regex>
>>> int main(int, char ** argv) {
>>>      std::regex_traits<char>().transform(argv[0], argv[0] + 1);
>>> }
>>
>>> $ clang++ --gcc-toolchain=... -fsanitize=undefined -O2 test.cc
>>> /usr/bin/ld: /tmp/test-c112b1.o: in function `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > std::__cxx11::regex_traits<char>::transform<char*>(char*, char*) const':
>>> test.cc:(.text._ZNKSt7__cxx1112regex_traitsIcE9transformIPcEENS_12basic_stringIcSt11char_traitsIcESaIcEEET_S9_[_ZNKSt7__cxx1112regex_traitsIcE9transformIPcEENS_12basic_stringIcSt11char_traitsIcESaIcEEET_S9_]+0x1b): undefined reference to `std::__cxx11::collate<char> const* std::__try_use_facet<std::__cxx11::collate<char> >(std::locale const&)'
>>> clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
> 
> That should be present, andis present in my builds:
> 
> _ZSt15__try_use_facetINSt7__cxx117collateIcEEEPKT_RKSt6locale
> std::__cxx11::collate<char> const*
> std::__try_use_facet<std::__cxx11::collate<char> >(std::locale const&)
> version status: compatible
> GLIBCXX_3.4.31
> type: function
> status: added
> 
> Was this a clean build, or incremental? I'm guessing the latter.

Yes, indeed.  And a full rebuild fixed the issue for me.

Sorry for the noise.


  reply	other threads:[~2022-11-13 19:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11  5:30 Jonathan Wakely
2022-11-11 21:00 ` Stephan Bergmann
2022-11-12  2:47   ` Jonathan Wakely
2022-11-13 19:22     ` Stephan Bergmann [this message]
2022-11-13 19:38       ` Jonathan Wakely

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=57ee8a3e-c7b4-54ee-9274-21e387a48037@redhat.com \
    --to=sbergman@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@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).