From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127571 invoked by alias); 27 Feb 2018 14:08:36 -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 126965 invoked by uid 89); 27 Feb 2018 14:08:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-23.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,KAM_STOCKGEN,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=Pascal, Cesar, cesar, H*r:PST X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 27 Feb 2018 14:08:34 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtps (TLSv1:ECDHE-RSA-AES256-SHA:256) id 1eqfvk-0005tA-1L from Thomas_Schwinge@mentor.com ; Tue, 27 Feb 2018 06:08:32 -0800 Received: from tftp-cs (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.3.224.2; Tue, 27 Feb 2018 06:08:31 -0800 Received: by tftp-cs (Postfix, from userid 49978) id 0BB83C229E; Tue, 27 Feb 2018 06:08:31 -0800 (PST) From: Thomas Schwinge To: , Richard Biener CC: Tom de Vries , Cesar Philippidis Subject: Re: [PATCH,PTX] Add support for CUDA 9 In-Reply-To: References: <002bf03f-baad-5809-6e9a-2fdffa0c1e2c@codesourcery.com> <6fd03d69-e18f-fb3d-f7c3-f833c8ba5ff7@codesourcery.com> User-Agent: Notmuch/0.9-125-g4686d11 (http://notmuchmail.org) Emacs/25.2.2 (x86_64-pc-linux-gnu) Date: Tue, 27 Feb 2018 14:08:00 -0000 Message-ID: <87sh9mjzjb.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2018-02/txt/msg01497.txt.bz2 Hi! Given that several users have run into this, is this (trunk r256891) OK to commit to open release branches, too? On Fri, 19 Jan 2018 09:42:08 +0100, Tom de Vries w= rote: > On 01/19/2018 01:59 AM, Cesar Philippidis wrote: > > Here's the updated patch with the changes that you requested. There are > > no new regressions in trunk. I tested it on my desktop running driver > > 387.34 on a Pascal GPU. > >=20 > > Is this OK for trunk? >=20 > OK with 'PR target/83790' added to the changelog entry. >=20 > Thanks, > - Tom >=20 > >=20 > > trunk-cuda9.diff > >=20 > >=20 > > 2018-01-18 Cesar Philippidis > >=20 > > gcc/ > > * config/nvptx/nvptx.c (output_init_frag): Don't use generic address > > spaces for function labels. > >=20 > > gcc/testsuite/ > > * gcc.target/nvptx/indirect_call.c: New test. > >=20 > > diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c > > index 86fc13f4fc0..4cb87c8ad07 100644 > > --- a/gcc/config/nvptx/nvptx.c > > +++ b/gcc/config/nvptx/nvptx.c > > @@ -1899,9 +1899,15 @@ output_init_frag (rtx sym) > >=20=20=20=20=20 > > if (sym) > > { > > - fprintf (asm_out_file, "generic("); > > + bool function =3D (SYMBOL_REF_DECL (sym) > > + && (TREE_CODE (SYMBOL_REF_DECL (sym)) =3D=3D FUNCTION_DECL)); > > + if (!function) > > + fprintf (asm_out_file, "generic("); > > output_address (VOIDmode, sym); > > - fprintf (asm_out_file, val ? ") + " : ")"); > > + if (!function) > > + fprintf (asm_out_file, ")"); > > + if (val) > > + fprintf (asm_out_file, " + "); > > } > >=20=20=20 > > if (!sym || val) > > diff --git a/gcc/testsuite/gcc.target/nvptx/indirect_call.c b/gcc/tests= uite/gcc.target/nvptx/indirect_call.c > > new file mode 100644 > > index 00000000000..39992a7137b > > --- /dev/null > > +++ b/gcc/testsuite/gcc.target/nvptx/indirect_call.c > > @@ -0,0 +1,19 @@ > > +/* { dg-options "-O2 -msoft-stack" } */ > > +/* { dg-do run } */ > > + > > +int > > +f1 (int a) > > +{ > > + return a + 1; > > +} > > + > > +int (*f2)(int) =3D f1; > > + > > +int > > +main () > > +{ > > + if (f2 (100) !=3D 101) > > + __builtin_abort(); > > + > > + return 0; > > +} Gr=C3=BC=C3=9Fe Thomas