]> gcc.gnu.org Git - gcc.git/commit
libgomp: Fix GOMP_DEVICE_NUM_VAR stringification during offload image load
authorChung-Lin Tang <cltang@codesourcery.com>
Tue, 4 Jan 2022 09:26:23 +0000 (17:26 +0800)
committerChung-Lin Tang <cltang@codesourcery.com>
Tue, 4 Jan 2022 09:31:36 +0000 (17:31 +0800)
commitb5435aab8658396c9209027007eed268fa9232f1
treec7659a6590a1de1e205723a1555ced5b44fd36cf
parenta0de41113042d78db435ad36080f4298ce3f82b4
libgomp: Fix GOMP_DEVICE_NUM_VAR stringification during offload image load

In the patch that implemented omp_get_device_num(), there was an error where
the stringification of GOMP_DEVICE_NUM_VAR, which is the macro expanding to
the actual symbol used, was erroneously using the STRINGX() macro in the
libgomp offload image symbol search, and expansion of the variable name
string through the additional layer of preprocessor symbol was not properly
achieved.

This patch fixes this by changing to properly use XSTRING(), also from
include/symcat.h.

libgomp/ChangeLog:

* plugin/plugin-gcn.c (GOMP_OFFLOAD_load_image): Change uses of STRINGX
into XSTRING when looking for GOMP_DEVICE_NUM_VAR in offload image.
* plugin/plugin-nvptx.c (GOMP_OFFLOAD_load_image): Likewise.

(cherry picked from commit fbb592407c9dd244b4cea086cbb90d7bd0bf60bb)
libgomp/plugin/plugin-gcn.c
libgomp/plugin/plugin-nvptx.c
This page took 0.067504 seconds and 6 git commands to generate.