From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CB4CB385773B; Fri, 5 May 2023 09:28:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CB4CB385773B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683278907; bh=bA84Ceg2Xr9vm2Mt4fEWEtZG1tXmH+NMf4sZxvAKGeo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HhcbKcKnGuBVCLf8m4K/l5Ejn1tPLTAwuYBfVWbGRq9vV5Hv9Om5R0R0v3l9qtbBt w4JtYXFeLZ2sdbjOJs+hV6Nesj5XRZ4GNolHz3sJR7dk50wXcD61AwpUQ6dGQw2Lug vNcigs0raRkEY1Aad97RETWjsVbgpqlBpEUw5nhY= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgomp/108098] OpenMP/nvptx reverse offload execution test FAILs Date: Fri, 05 May 2023 09:28:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgomp X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108098 --- Comment #5 from CVS Commits --- The master branch has been updated by Tobias Burnus : https://gcc.gnu.org/g:4359724cba31b2645f6106266bef019c3d6ef16a commit r14-491-g4359724cba31b2645f6106266bef019c3d6ef16a Author: Tobias Burnus Date: Fri May 5 11:27:32 2023 +0200 nvptx/mkoffload.cc: Add dummy proc for OpenMP rev-offload table [PR1080= 98] Seemingly, the ptx JIT of CUDA <=3D 10.2 replaces function pointers in = global variables by NULL if a translation does not contain any executable code= . It works with CUDA 11.1. The code of this commit is about reverse offload; having NULL values disables the side of reverse offload during image lo= ad. Solution is the same as found by Thomas for a related issue: Adding a d= ummy procedure. Cf. the PR of this issue and Thomas' patch "nvptx: Support global constructors/destructors via 'collect2'" https://gcc.gnu.org/pipermail/gcc-patches/2022-December/607749.html As that approach also works here: Co-authored-by: Thomas Schwinge gcc/ PR libgomp/108098 * config/nvptx/mkoffload.cc (process): Emit dummy procedure alongside reverse-offload function table to prevent NULL values of the function addresses.=