[flang-commits] [flang] [flang][cuda][NFC] Remove TODO implemented in semantic (PR #148058)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Thu Jul 10 13:55:05 PDT 2025


https://github.com/clementval created https://github.com/llvm/llvm-project/pull/148058

This is implemented here: https://github.com/llvm/llvm-project/blob/838701a5403efbaf6e25254377a6f033acee6681/flang/lib/Semantics/check-cuda.cpp#L764

Keep the assert in place as security, 

>From 03426b47510586a5e6da08e2adbb59d6813d7701 Mon Sep 17 00:00:00 2001
From: Valentin Clement <clementval at gmail.com>
Date: Thu, 10 Jul 2025 13:53:42 -0700
Subject: [PATCH] [flang][cuda][NFC] Remove TODO implemented in semantic

---
 flang/lib/Lower/Bridge.cpp | 2 --
 1 file changed, 2 deletions(-)

diff --git a/flang/lib/Lower/Bridge.cpp b/flang/lib/Lower/Bridge.cpp
index 987fd3095fdf6..cd55d10314740 100644
--- a/flang/lib/Lower/Bridge.cpp
+++ b/flang/lib/Lower/Bridge.cpp
@@ -4842,8 +4842,6 @@ class FirConverter : public Fortran::lower::AbstractConverter {
                   .detailsIf<Fortran::semantics::ObjectEntityDetails>()) {
         if (details->cudaDataAttr() &&
             *details->cudaDataAttr() != Fortran::common::CUDADataAttr::Pinned) {
-          // TODO: This should probably being checked in semantic and give a
-          // proper error.
           assert(
               nbDeviceResidentObject <= 1 &&
               "Only one reference to the device resident object is supported");



More information about the flang-commits mailing list