diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2023-06-16 17:21:59 +0200 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2023-06-16 17:48:09 +0200 |
commit | 8216ca85037be9f4d5c20540522a22a4a93b660e (patch) | |
tree | 8c861605f379299840b712a519faeddbbef1cae4 /libcpp | |
parent | 95020d33ad6991fe4fbdccf70e7133116cac68f4 (diff) | |
download | gcc-8216ca85037be9f4d5c20540522a22a4a93b660e.zip gcc-8216ca85037be9f4d5c20540522a22a4a93b660e.tar.gz gcc-8216ca85037be9f4d5c20540522a22a4a93b660e.tar.bz2 |
libgomp: Fix OMP_TARGET_OFFLOAD=mandatory
It turned out that gomp_init_targets_once() was not run when directly
calling 'omp target' or 'omp target (enter/exit) data' causing an
abort with OMP_TARGET_OFFLOAD=mandatory wrongly claiming that no
device is available. It was called a tiny bit later but few lines too
late for updating the default-device-var.
libgomp/ChangeLog:
* target.c (resolve_device): Call gomp_get_num_devices early to ensure
gomp_init_targets_once was called before using default-device-var.
* testsuite/libgomp.c/target-55.c: New test.
* testsuite/libgomp.c/target-55a.c: New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions