[flang-commits] [flang] [flang] dummy arguments used as function calls (PR #196426)
Eugene Epshteyn via flang-commits
flang-commits at lists.llvm.org
Fri May 8 10:44:10 PDT 2026
================
@@ -98,3 +98,9 @@ subroutine s5
!ERROR: 'k' is already declared in this scoping unit
k() = 0.0
end
+
+subroutine s6(b)
+ !ERROR: Dummy argument 'b' may not be used as a statement function
+ !ERROR: 'b' is not a callable procedure
+ b(c) = 0
+end
----------------
eugeneepshteyn wrote:
Let's also test a case of multiple entries:
```
subroutine s7
entry e7(b)
b(c) = 0
end
```
Also, the following error out, but for a different reason:
```
subroutine s8(p)
external p ! makes 'p' a dummy procedure
p(c) = 0
end
```
https://github.com/llvm/llvm-project/pull/196426
More information about the flang-commits
mailing list