From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id AE054385B51C for ; Fri, 12 May 2023 13:10:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AE054385B51C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id DAEA3229C3; Fri, 12 May 2023 13:10:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1683897005; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DLK1jLv1Khd/2LGy6FySwoNZicJvgv54BQgu9pr0Mrk=; b=S8jAqN2ZWsB2uhC7RonTn/PxuYfqEppK5X0RrhLlc1tgVcN5QLXXWBwCkICYklyJEoQjfu nwdgUpUpQWt2afRNMWSgxGXwpZd6GfYVB/9icSHW9mrQ9B8MITHWk6cIXD7c5J+A4D5Ng7 RKSBkIB8nQ9FkeiYJJTQ/T5QMq7CPc8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1683897005; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DLK1jLv1Khd/2LGy6FySwoNZicJvgv54BQgu9pr0Mrk=; b=5umJ5Px9aBc8VD9vT+o7dqqahSGvhOrpsULlFD6sEpN7LVbsMH9C+L9zbFhfVYLtNh/dIC 1GHxpfPTAh5UCZDA== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id CD44A2C152; Fri, 12 May 2023 13:10:05 +0000 (UTC) Date: Fri, 12 May 2023 13:10:05 +0000 (UTC) From: Richard Biener To: Tobias Burnus cc: gcc-patches Subject: Re: [Patch] LTO: Fix writing of toplevel asm with offloading [PR109816] In-Reply-To: <74555a9a-8eb8-14ac-a5bd-d0ab15c9acc1@codesourcery.com> Message-ID: References: <74555a9a-8eb8-14ac-a5bd-d0ab15c9acc1@codesourcery.com> User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, 12 May 2023, Tobias Burnus wrote: > Long standing issue but as top-level 'asm' statement were rare, it did not > show up. > 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 > offloading-device > lto1 for digestion by the device-target assembler. While the llvm-mc linker > user by > GCN did accept .globl, nvptx's ptxas did choke on it. > > Additionally, as the assembly was already written for offloading, the output > 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 does > not > contain the _ZSt21ios_base_library_initv while the host-side (before or after > LTO) > should contain it, but only with _GLIBCXX_SYMVER_GNU? > Otherwise, the testcase tests only and at least whether it breaks with nvptx > as ptxas does not like the symbol. > > * * * > > Tested (manually + running the OvO and sollve-testsuite) on x86-64-gnu-linux > with nvptx > offloading and with "make check -k" on x86-64-gnu-linux, albeit without > offloading configured. > 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 testsuite > changes. > > OK for mainline and GCC 13? Without any idea about the details above the patch looks quite reasonable, thus OK for trunk. OK for branch after a while if no issues showed up. Thanks, Richard.