[clang] [clang][HIP] Do not treat address of managed variable as a constant expression (PR #217047)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 19 05:47:44 PDT 2026
================
@@ -161,6 +161,26 @@ __device__ __host__ int load4() {
return ex;
}
+namespace gh198079 {
+__managed__ int x = 0;
+struct S {
+ int *p;
+};
+__attribute__((device)) void f() {
+ S s{&x};
----------------
Fznamznon wrote:
Sure, done
https://github.com/llvm/llvm-project/pull/217047
More information about the cfe-commits
mailing list