From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 24BA1385840C; Mon, 8 May 2023 21:15:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 24BA1385840C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683580540; bh=iPEHwLhZ9o4ZyK+/74sj7CeRU3GSqlqhLA7xNFhzUig=; h=From:To:Subject:Date:In-Reply-To:References:From; b=d0zIvSCVu1rm6SgDcksQjjFYTACk/t6qgJS9tnayNfWSoCVyw6jEvUrR/h2VGqYuS b/1O3gV7i1k8x0xBPXOYXU2vDBBCIO+BlXNbLdIoS0ixQPzD0vV9vtz6fGGcQXHJzr 3WOpOlQmxxF0LvDHVPlkfsBaK786abQAdV5Mem6o= 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: Mon, 08 May 2023 21:15:39 +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 #6 from CVS Commits --- The releases/gcc-13 branch has been updated by Tobias Burnus : https://gcc.gnu.org/g:615b920553fd28e9d4732dedcd799227e82cc011 commit r13-7306-g615b920553fd28e9d4732dedcd799227e82cc011 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. (cherry picked from commit 4359724cba31b2645f6106266bef019c3d6ef16a)=