[flang-commits] [flang] [flang][cuda][semantics] Reject unguarded host-only and device-only calls in CUDA HOST, DEVICE procedures (PR #228176)
Andre Kuhlenschmidt via flang-commits
flang-commits at lists.llvm.org
Mon Oct 5 09:47:03 PDT 2026
================
@@ -95,6 +136,11 @@ struct DeviceExprChecker
return parser::MessageFormattedText(
"warp match function disabled"_err_en_US);
}
+ if (*attrs == common::CUDASubprogramAttrs::Device &&
+ callContext_ == CallContext::HostDevice) {
+ return parser::MessageFormattedText(
+ "'%s' may not be called in host code"_err_en_US, x.GetName());
----------------
akuhlens wrote:
Done!
https://github.com/llvm/llvm-project/pull/228176
More information about the flang-commits
mailing list