[flang-commits] [flang] [flang] [cuda] Move SetImplicityCUDADevice after symbols in block construct are converted to objects (PR #143791)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Thu Jun 12 07:44:26 PDT 2025
================
@@ -2867,8 +2878,31 @@ void ScopeHandler::PopScope() {
// Entities that are not yet classified as objects or procedures are now
// assumed to be objects.
// TODO: Statement functions
+ bool inDeviceSubprogram{false};
+ Symbol *scopeSym{currScope().symbol()};
+ if (currScope().kind() == Scope::Kind::BlockConstruct) {
----------------
klausler wrote:
This must be a `while` loop; `block` constructs can nest. You could also use the utility function `GetProgramUnitContaining` instead.
https://github.com/llvm/llvm-project/pull/143791
More information about the flang-commits
mailing list