From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 751483858434; Thu, 11 May 2023 21:37:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 751483858434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683841035; bh=f9Xv1DbvTU8g/e12jyM9fHCkNEktaa/Ted2Nk/7pMDQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SXM1Go1mHhc91rlOnRlfQXJFRyLU6rKGFyujJnt5gEgy6WmR+tJVE6y/YR5bZ1m9Z v1evutPEwL2FlQPMqCEkavE4KraYwTcPn+c85sZh+fkKzY8wsiZw1XvXQwiOysOLZV V2yzyuYxCzeEB8kHIcvkm1ObzIw4WwdcF8EG55Wc= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/109816] [13/14 Regression] r14-321 fix for PR108969 breaks NVPTX offloading due to __asm (".globl _ZSt21ios_base_library_initv") Date: Thu, 11 May 2023 21:37:15 +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: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus 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: --- 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=3D109816 --- Comment #8 from Tobias Burnus --- First, I want to remark that inside lto_output_toplevel_asms,=20 lto_stream_offload_p is true even with -flto. However, the following is for output_symtab: (In reply to Jakub Jelinek from comment #7) > Not > --- gcc/lto-cgraph.cc 2023-01-09 13:30:47.105343886 +0100 > +++ gcc/lto-cgraph.cc 2023-05-11 23:05:54.266991677 +0200 > @@ -1023,7 +1023,8 @@ output_symtab (void) > if (!asm_nodes_output) > { > asm_nodes_output =3D true; > - lto_output_toplevel_asms (); > + if (!lto_stream_offload_p) > + lto_output_toplevel_asms (); This seems to work, kind of. The only case (I found) where it fails is for: -flto -fwpa Because in that case, lto_stream_offload_p =3D=3D 1. While there is a diagn= ostic (warning), it still duly continues and uses the wrong value. The diagnostic= is: cc1plus: warning: command-line option '-fwpa' is valid for LTO but not for = C++=