From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 99C8D384BC00; Thu, 7 Jul 2022 23:33:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 99C8D384BC00 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/105671] [11 Regression] Unexplained "undefined reference" error Date: Thu, 07 Jul 2022 23:33:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.1.1 X-Bugzilla-Keywords: link-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: redi at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jul 2022 23:33:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105671 --- Comment #9 from CVS Commits --- The releases/gcc-11 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:03af8492bee6243a9d10e78fea1a3e423bd5f9cd commit r11-10135-g03af8492bee6243a9d10e78fea1a3e423bd5f9cd Author: Jonathan Wakely Date: Fri May 27 12:43:18 2022 +0100 libstdc++: Mark non-exported function always_inline [PR105671] This new function was added for gcc 11.1 but is not exported from the shared library. Depending on inlining decisions, its callers might get inlined but an external definition be needed for this function. That then fails to link. Since we can't add the export to the gcc-11 release branch now, mark it always_inline. We can consider exporting it for gcc-13 if/when we bump the shared library version (and maybe also for gcc-12 which is currently at the same version as trunk). For now, the attribute will solve the problem on all affected branches. The function is small enough that force-inlining it shouldn't cause problems. libstdc++-v3/ChangeLog: PR libstdc++/105671 * include/std/sstream (basic_stringbuf::_M_high_mark): Add always_inline attribute. (cherry picked from commit de57440858591a88e8fd7ba2505ca54546c86021)=