From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id BD03F3858C52 for ; Sat, 13 May 2023 09:18:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BD03F3858C52 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.99,271,1677571200"; d="scan'208";a="5148779" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 13 May 2023 01:18:39 -0800 IronPort-SDR: +gVw96dsA3gCK+yg7n5/+loN7Bwt27Ga9RgXvVyTXoja66CcESyjgMCEyS0nO8mPdY/px23ely TBJE18DJX6cHGI0qU851AUGUQZ0xlESTndnAPUQtakRl3TXWE2UKdAAEhJtCPhyh7NqOsdKZ3n QhnZVz6D19ynOneCQ5YTsbc1hEka1gdk96tZvCgIHoGa2psn0jb0b04AY8gEaeacySDH58Khnn rqbPHxIqLU/p3ZJQCwJ0lAlxBgfCwJbhotHAAN4aGGP1gDwtR4iZxeoKsZo6FZiIpVaQYf3vDC 6f4= From: Thomas Schwinge To: Tobias Burnus , CC: Richard Biener Subject: Re: [Patch] LTO: Fix writing of toplevel asm with offloading [PR109816] In-Reply-To: <74555a9a-8eb8-14ac-a5bd-d0ab15c9acc1@codesourcery.com> References: <74555a9a-8eb8-14ac-a5bd-d0ab15c9acc1@codesourcery.com> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Sat, 13 May 2023 11:18:32 +0200 Message-ID: <874jogzj13.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-11.mgc.mentorg.com (139.181.222.11) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Hi! On 2023-05-12T14:46:21+0200, Tobias Burnus wrote: > Long standing issue but as top-level 'asm' statement were rare, it did no= t show up. Thanks for tracking this down, and fixing it! Presumably latent "forever" (here: since code offloading support was added, approximately one decade ago). > However, the fix for PR108969 in commit r14-321-g9a41d2cdbcd added code > > +#elif defined(_GLIBCXX_SYMVER_GNU) > + __extension__ __asm (".globl _ZSt21ios_base_library_initv"); > q > libstdc++-v3/include/std/iostream. This was then duly written by the offl= oading-device > lto1 for digestion by the device-target assembler. While the llvm-mc link= er user by > GCN did accept .globl, nvptx's ptxas did choke on it. > > Additionally, as the assembly was already written for offloading, the out= put was > lost on the host when using LTO for not only for offload but for real (i.= e. with -flto). > Has someone an idea how to check whether the offloading-code assembler do= es not > contain the _ZSt21ios_base_library_initv while the host-side (before or a= fter LTO) > should contain it, but only with _GLIBCXX_SYMVER_GNU? > Otherwise, the testcase tests only and at least whether it breaks with nv= ptx > as ptxas does not like the symbol. We can construct test cases with their own top-level 'asm', outside of the libstdc++ context? I'll try to come up with something. > The installed-build regtesting of "make check-target-libgomp" seems to be= currently broken > as it does run all checking code (check_effective_target...) but does not= seem to find > any actual testcase to be run, probably a side effect of the recent tests= uite changes. FUD. ;-O We've since determined that Tobias' testing problem was due to '//net/[...]' (double-slash) paths usage (with '/net' served by '/etc/auto.master:/net -hosts'), which apparently confused DejaGnu/TCL 'find' (as used in 'libgomp/testsuite/libgomp.*/*.exp'). Per : | By the way, all changes (individually) tested in a number of different | configurations: '--enable-languages=3D[...]', native vs. cross, build-tre= e | vs. installed testing, etc. Gr=C3=BC=C3=9Fe Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 201= , 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaf= t: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955