From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E73F6382DB30; Thu, 26 May 2022 23:09:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E73F6382DB30 From: "jsm28 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/105671] [11/12/13 Regression] Unexplained "undefined reference" error Date: Thu, 26 May 2022 23:09:34 +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: jsm28 at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: short_desc cc component target_milestone 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, 26 May 2022 23:09:35 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105671 Joseph S. Myers changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Unexplained "undefined |[11/12/13 Regression] |reference" error |Unexplained "undefined | |reference" error CC| |jsm28 at gcc dot gnu.org Component|c++ |libstdc++ Target Milestone|--- |11.4 --- Comment #2 from Joseph S. Myers --- I'm seeing the same undefined reference on a customer test case. I haven't reduced it to a self-contained test case either, but as far as I can see th= is is a libstdc++ issue (rather than a front-end or LTO bug). _M_high_mark (wh= ich is new in libstdc++ in GCC 11) isn't exported from libstdc++.so (it's prese= nt in libstdc++.a), presumably because the symbol version maps don't include i= t, so if the compiler decides to inline one of the functions from the header t= hat calls _M_high_mark, without inlining _M_high_mark itself, there is an undef= ined reference to _M_high_mark. (This selective inlining is what I haven't reproduced in a self-contained test, even when adjusting various inlining parameters, but it would explain the undefined reference.)=