[flang-commits] [flang] [flang] [cuda] implicitly set DEVICE attribute to scalars in device routines (PR #140834)
Valentin Clement バレンタイン クレメン via flang-commits
flang-commits at lists.llvm.org
Wed May 21 10:31:36 PDT 2025
================
@@ -0,0 +1,29 @@
+! RUN: %python %S/test_errors.py %s %flang_fc1
+! Test generic matching with scalars argument without device attr
+
+module mlocModule
+ interface maxlocUpdate
+ module procedure :: &
+ maxlocUpdateR_32F, &
+ maxlocUpdateR_64F
+ end interface maxlocUpdate
+contains
+
+ attributes(global) subroutine maxlocPartialMaskR_32F1D()
+ implicit none
+ real(4) :: mval
+
+ call maxlocUpdate(mval)
+
+ end subroutine maxlocPartialMaskR_32F1D
+
+ attributes(device) subroutine maxlocUpdateR_32F(mval)
+ real(4) :: mval
+ end subroutine maxlocUpdateR_32F
+
+ attributes(device) subroutine maxlocUpdateR_64F(mval)
+ real(8) :: mval
+ end subroutine maxlocUpdateR_64F
+end module
+
+! CHECK-LABEL: func.func @_QMmlocmodulePmaxlocpartialmaskr_32f1d()
----------------
clementval wrote:
You can remove this check line.
https://github.com/llvm/llvm-project/pull/140834
More information about the flang-commits
mailing list