public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: Tobias Burnus <tobias@codesourcery.com>, <gcc-patches@gcc.gnu.org>
Cc: Richard Biener <rguenther@suse.de>
Subject: Re: [Patch] LTO: Fix writing of toplevel asm with offloading [PR109816]
Date: Sat, 13 May 2023 11:18:32 +0200	[thread overview]
Message-ID: <874jogzj13.fsf@euler.schwinge.homeip.net> (raw)
In-Reply-To: <74555a9a-8eb8-14ac-a5bd-d0ab15c9acc1@codesourcery.com>

Hi!

On 2023-05-12T14:46:21+0200, Tobias Burnus <tobias@codesourcery.com> wrote:
> Long standing issue but as top-level 'asm' statement were rare, it did not 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 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.

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 testsuite 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
<https://inbox.sourceware.org/877cte9cfa.fsf@euler.schwinge.homeip.net>:

| By the way, all changes (individually) tested in a number of different
| configurations: '--enable-languages=[...]', native vs. cross, build-tree
| vs. installed testing, etc.


Grüße
 Thomas
-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955

      parent reply	other threads:[~2023-05-13  9:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12 12:46 Tobias Burnus
2023-05-12 13:10 ` Richard Biener
2023-05-13  9:18 ` Thomas Schwinge [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jogzj13.fsf@euler.schwinge.homeip.net \
    --to=thomas@codesourcery.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    --cc=tobias@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).