Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3219f1a

Browse files
committed
[OpenMP] Force initialization of global device environment
Summary: This causes issues when we omit this, which requires a constructor from an incompatible address space and bad things happen.
1 parent f6e050c commit 3219f1a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

openmp/device/src/Configuration.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ using namespace ompx;
2828
// This variable should be visible to the plugin so we override the default
2929
// hidden visibility.
3030
[[gnu::used, gnu::retain, gnu::weak,
31-
gnu::visibility(
32-
"protected")]] Constant<DeviceEnvironmentTy> __omp_rtl_device_environment;
31+
gnu::visibility("protected")]] Constant<DeviceEnvironmentTy>
32+
__omp_rtl_device_environment{};
3333

3434
uint32_t config::getAssumeTeamsOversubscription() {
3535
return __omp_rtl_assume_teams_oversubscription;

0 commit comments

Comments
 (0)