From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5C51C38515FF; Mon, 12 Sep 2022 09:37:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C51C38515FF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662975435; bh=wuXcL6UkiB/H4wMxjXwJxcd49s97iMs7nvaYVMxCvBk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=fIadtwyK2kiKNcGtbNaOdLP06H0AbvXP5OQN6y8tzpdO4NJgRcSnUF4Ugc6hFJMwt whqMHf67K/KOawEmvhnLo1ysIqqCxkRtr8b1CEpO73E2r21zjSpJJtkE4d8+5mVjmz j5Y7n0CLQV2OUfIdL0oRVSgNLyA7hm6eU4cumuAE= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/105329] [12/13 Regression] Bogus restrict warning when assigning 1-char string literal to std::string since r12-3347-g8af8abfbbace49e6 Date: Mon, 12 Sep 2022 09:37:13 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: diagnostic, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105329 --- Comment #22 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:723ef5a937dbab5e7a35761fd7f0ff0c76849340 commit r13-2618-g723ef5a937dbab5e7a35761fd7f0ff0c76849340 Author: Jakub Jelinek Date: Mon Sep 12 11:31:11 2022 +0200 libstdc++: Outline the overlapping case of string _M_replace into a separate function [PR105329] The following patch is partially a workaround for bogus warnings when the compiler isn't able to fold _M_disjunct call into constant false, but also an optimization attempt - assuming _M_disjunct (__s) is rare, the patch should shrink code size for the common case and use library or for non-standard instantiations an out of line function to handle the rare case. 2022-09-12 Jakub Jelinek PR tree-optimization/105329 * acinclude.m4 (libtool_VERSION): Change to 6:31:0. * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Don't export std::basic_string methods with name length of 15. (GLIBCXX_3.4.31): Export std::basic_string::_M_replace_cold. * testsuite/util/testsuite_abi.cc (check_version): Handle GLIBCXX_3.4.31. * include/bits/basic_string.h (std::basic_string::_M_replace_co= ld): Declare. * include/bits/basic_string.tcc (std::basic_string::_M_replace_cold): Define and export even for C++20. (std::basic_string::_M_replace): Use __builtin_expect, outline the overlapping case to _M_replace_cold. * configure: Regenerated.=