From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 55FE33858289 for ; Sun, 13 Nov 2022 19:22:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 55FE33858289 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668367354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0fDiqTlwzvjDzd+GIg9YK/ZnbVUe4mLIa7DJIh55z5Y=; b=eMgkS+RHmxk8EgyLeqvYXmqesP3GosV3CTJqMVNNMS87wobJF8ubpBIBVXOdyrgR2ckUoC nDpIxwSTs2+8+9vwOiqySMEJdrrRICxA9MDk77Gl+0yBMJONmMOsyRsS8ksEw/h+tUBwGj Abq+j5/KQoYJMc9cVz/1IPLFb4dKU2k= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-457-13byCkyrOvCIlUUoyQVjYA-1; Sun, 13 Nov 2022 14:22:33 -0500 X-MC-Unique: 13byCkyrOvCIlUUoyQVjYA-1 Received: by mail-ed1-f70.google.com with SMTP id e15-20020a056402190f00b00461b0576620so6794928edz.2 for ; Sun, 13 Nov 2022 11:22:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0fDiqTlwzvjDzd+GIg9YK/ZnbVUe4mLIa7DJIh55z5Y=; b=PHB1ICj1SOptJCQ1Q8HUdhmd7znOMevAibe9WVtJntTHzon/54dH72PsvpNQWSjzSG sXGeDsJ8V3yJmaoaB5SVbGWGIhqDDt9/W9biVqD6DMsBkSvBUP4bPR+7vrj/TP/0YsOt BBOa5C7onpkgMo3hr4/vPmAo9qaGeoRWf6i9ABtyGw0vKig4y+5H5q20e30Gxd57JLtI PVdjNLFUOVj7ilKr1dcxof8/Wy6w1Ge6s2q3t3pSFyj7xH6+3P2nDDatiOxlGwJCdRPV f8KaXP3pt9gzd7aSu3rF+ixnI5pm2m2LnuAKvuJHahy6aVSe6WbEXKjQtUhjzT6B5AZD RZ6g== X-Gm-Message-State: ANoB5pkts5JbD6ZJxu6mmFNnZvX1iEFVpxFhiewugkW+jS/cDQg2/65f CXORrZGFM4IkB4eXXqCqwoLWV2tm9/IygAIqVb5yDlRp/5zI7hpiB+dJFwEUqy6qVIuZ7LeCdlB +9jc6ud6qTp5MnvU= X-Received: by 2002:a50:ed84:0:b0:467:6b91:b591 with SMTP id h4-20020a50ed84000000b004676b91b591mr7762875edr.402.1668367351112; Sun, 13 Nov 2022 11:22:31 -0800 (PST) X-Google-Smtp-Source: AA0mqf5eWSW48olb3f9W7+0UOg6loEPuABi2ni/jNnICKnyk7wYoNavKfswL0m3AM1q3aX3neIxNKg== X-Received: by 2002:a50:ed84:0:b0:467:6b91:b591 with SMTP id h4-20020a50ed84000000b004676b91b591mr7762864edr.402.1668367350899; Sun, 13 Nov 2022 11:22:30 -0800 (PST) Received: from [192.168.178.30] (i59F6C4A8.versanet.de. [89.246.196.168]) by smtp.gmail.com with ESMTPSA id lv18-20020a170906bc9200b007415f8ffcbbsm3286027ejb.98.2022.11.13.11.22.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 13 Nov 2022 11:22:30 -0800 (PST) Message-ID: <57ee8a3e-c7b4-54ee-9274-21e387a48037@redhat.com> Date: Sun, 13 Nov 2022 20:22:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [committed] libstdc++: Avoid redundant checks in std::use_facet [PR103755] To: Jonathan Wakely Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org References: <20221111053043.563832-1-jwakely@redhat.com> From: Stephan Bergmann In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_BARRACUDACENTRAL,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/12/22 03:47, Jonathan Wakely wrote: > On Fri, 11 Nov 2022 at 21:00, Stephan Bergmann 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 >>> int main(int, char ** argv) { >>> std::regex_traits().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, std::allocator > std::__cxx11::regex_traits::transform(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 const* std::__try_use_facet >(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 const* > std::__try_use_facet >(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.