yaxunl marked an inline comment as done. yaxunl added inline comments.
================ Comment at: clang/test/SemaCUDA/device-use-host-var.cu:41 *out = global_const_var; + *out = global_const_struct_var.x; ---------------- tra wrote: > I do not think it should be allowed. We end up instantiating the variable on > device, even though the variable should be host-only. > > Right now we allow it, but end up with an `.extern .const` which will make > ptxas fail: > https://godbolt.org/z/sx9845 > > If we do allow it, we'll need to make sure that we only use the value, but do > not allow instantiating the variable. > will only not allow this since it results in ODR-use of the host var. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98193/new/ https://reviews.llvm.org/D98193 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits