[flang-commits] [flang] [flang] Permit unused USE association of subprogram name (PR #134009)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Wed Apr 2 07:52:32 PDT 2025
================
@@ -22,13 +22,17 @@ subroutine s(i)
end module
subroutine foo
- !ERROR: Cannot use-associate 'foo'; it is already declared in this scope
+ !PORTABILITY: 'foo' is use-associated into a subprogram of the same name
use m1
+ !ERROR: Reference to 'foo' is ambiguous
+ call foo
end
subroutine bar
- !ERROR: Cannot use-associate 'bar'; it is already declared in this scope
+ !PORTABILITY: 'foo' is use-associated into a subprogram of the same name
use m1, bar => foo
+ !ERROR: Reference to 'bar' is ambiguous
+ call bar
----------------
klausler wrote:
No, it still doesn't. It only applies to USE-associated names that conflict with the name of the subprogram into whose scope the USE association occurs.
https://github.com/llvm/llvm-project/pull/134009
More information about the flang-commits
mailing list