[flang-commits] [flang] [flang][cuda] Fix crash in semantic (PR #88577)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Fri Apr 12 14:01:00 PDT 2024


================
@@ -480,10 +480,15 @@ void CUDAChecker::Enter(const parser::CUFKernelDoConstruct &x) {
 }
 
 void CUDAChecker::Enter(const parser::AssignmentStmt &x) {
+  auto lhsLoc{std::get<parser::Variable>(x.t).GetSource()};
+  const auto &scope{context_.FindScope(lhsLoc)};
+  const Scope &progUnit{GetProgramUnitContaining(scope)};
+  if (IsCUDADeviceContext(&progUnit))
----------------
clementval wrote:

Sorry always forgot to add them in Semantics!

https://github.com/llvm/llvm-project/pull/88577


More information about the flang-commits mailing list