From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 35213 invoked by alias); 22 Dec 2018 15:09:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 35203 invoked by uid 89); 22 Dec 2018 15:09:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Iain, iain, Hx-languages-length:1480, hopes X-HELO: mail-wm1-f66.google.com Received: from mail-wm1-f66.google.com (HELO mail-wm1-f66.google.com) (209.85.128.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 22 Dec 2018 15:09:40 +0000 Received: by mail-wm1-f66.google.com with SMTP id b11so7842189wmj.1 for ; Sat, 22 Dec 2018 07:09:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=/DYGNvLTZe9FOKLFUy2WvuAS6K5wwqTCWF19e28YL48=; b=ViOfgq25siD9PITS85+lb5ts5sTxEJSkRAKhl8/hTXoxYJIlgq2bWGZ9BgvkYXvY1I Ne4u00rVDjOpONFZ8RUNYhRuZVK8fqCc7Iu65u/Ph+Y2YsxoE8euhXymCkioYPjQJHBF Y2EZ/DIYrE5WBH2btclWhR24FvAn8pT5BwATBMC4GeNmImBmdnlD7NR+XTdbByRrDBpM b7DIlDe7anMAXUUZH3wy4xaqdBe5ws0ToFnVoBiuLwJ41lU44uwMSbf2Js/WtSGz35LP PcJZGvzT/lm2mtBBjEybaPsU4HKleqYe7qOJ7l0xiNgiS/YKUV/pt3wjzSb2FEDlYn6/ eihg== Return-Path: Received: from euterpe-sie.home (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.googlemail.com with ESMTPSA id t76sm20695283wme.33.2018.12.22.07.09.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Dec 2018 07:09:37 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [patch,openacc] Fix PR71959: lto dump of callee counts From: Iain Sandoe In-Reply-To: <20181221164732.53df29f8@squid.athome> Date: Sat, 22 Dec 2018 18:53:00 -0000 Cc: Jakub Jelinek , Martin Jambor , Cesar Philippidis , "gcc-patches@gcc.gnu.org" , Thomas Schwinge Content-Transfer-Encoding: quoted-printable Message-Id: <844297BE-45C7-4CF9-BB5E-C77E9B5B9EBB@googlemail.com> References: <319b3ebd-c601-449b-718c-963b68414224@codesourcery.com> <20181221025636.3f9b377c@squid.athome> <20181221132303.1ab86f96@squid.athome> <20181221133119.GF23305@tucnak> <20181221164732.53df29f8@squid.athome> To: Julian Brown X-SW-Source: 2018-12/txt/msg01625.txt.bz2 Hi Julian, > On 21 Dec 2018, at 16:47, Julian Brown wrote: >=20 > On Fri, 21 Dec 2018 14:31:19 +0100 > Jakub Jelinek wrote: >=20 >> On Fri, Dec 21, 2018 at 01:23:03PM +0000, Julian Brown wrote: >>> 2018-xx-yy Nathan Sidwell >=20 >>> * testsuite/libgomp.oacc-c++/pr71959-a.C: New. >>> * testsuite/libgomp.oacc-c++/pr71959.C: New.=20=20 >>=20 >>> +void apply (int (*fn)(), Iter out) asm >>> ("_ZN5Apply5applyEPFivE4Iter");=20=20 >>=20 >> Will this work even on targets that use _ or other symbol prefixes? >=20 > I'd guess so, else there would be no portable way of using "asm" to > write pre-mangled C++ names. The only existing similar uses I could find > in the testsuite are for the ifunc attribute, not asm, though (e.g. > g++.dg/ext/attr-ifunc-*.C). It won=E2=80=99t work on such targets (e.g. Darwin) =E2=80=A6 but it=E2=80=99s not too hard to make it happen (see, for example= , gcc.dg/memcmp-1.c) One just has to remember that __USER_LABEL_PREFIX__ is a token, not a strin= g. so .. in the example above=E2=80=A6 #define STR1(X) #X #define STR2(X) STR1(X) =E2=80=A6. asm(STR2(__USER_LABEL_PREFIX__) "_ZN5Apply5applyEPFivE4Iter=E2=80=9D); > Anyway, OpenACC is only useful for a handful of targets at present, > neither of which use special symbol prefixes AFAIK. I have hopes of one day getting offloading to work on Darwin (the only limi= tation is developer time, not technical feasibility) ..=20 cheers Iain