diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2023-05-05 11:27:32 +0200 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2023-05-05 11:27:32 +0200 |
commit | 4359724cba31b2645f6106266bef019c3d6ef16a (patch) | |
tree | 7febe16cf9c9a785c8e6f9d880e5397019ea20e6 /libcpp | |
parent | 21cf5ec1993f33d7993559db25bc14c1fa57d790 (diff) | |
download | gcc-4359724cba31b2645f6106266bef019c3d6ef16a.zip gcc-4359724cba31b2645f6106266bef019c3d6ef16a.tar.gz gcc-4359724cba31b2645f6106266bef019c3d6ef16a.tar.bz2 |
nvptx/mkoffload.cc: Add dummy proc for OpenMP rev-offload table [PR108098]
Seemingly, the ptx JIT of CUDA <= 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 load.
Solution is the same as found by Thomas for a related issue: Adding a dummy
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 <thomas@codesourcery.com>
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.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions