[Flang] Missing diagnose on multiple proc-decl when Binding NAME= is present
Consider the following code:
interface
subroutine foo() BIND(C)
end subroutine
end interface
procedure(foo), BIND(C, NAME='myfptr') :: p1, p2, p3
end
Flang currently compiles it successfully, but it violates the following constraint
C1520 (R1512) If proc-language-binding-spec with NAME= is specified, then proc-decl-list shall contain exactly
21 one proc-decl, which shall neither have the POINTER attribute nor be a dummy procedure.
@llvm/issue-subscribers-bug
Author: Daniel Chen (DanielCChen)
procedure(foo), BIND(C, NAME='myfptr') :: p1, p2, p3 end
Flang currently compiles it successfully, but it violates the following constraint
C1520 (R1512) If proc-language-binding-spec with NAME= is specified, then proc-decl-list shall contain exactly 21 one proc-decl, which shall neither have the POINTER attribute nor be a dummy procedure.
</details>
@llvm/issue-subscribers-flang-frontend
Author: Daniel Chen (DanielCChen)
procedure(foo), BIND(C, NAME='myfptr') :: p1, p2, p3 end
Flang currently compiles it successfully, but it violates the following constraint
C1520 (R1512) If proc-language-binding-spec with NAME= is specified, then proc-decl-list shall contain exactly 21 one proc-decl, which shall neither have the POINTER attribute nor be a dummy procedure.
</details>
https://github.com/llvm/llvm-project/pull/82842
I have verified PR #82842 fixed the issue. Flang now issues
A procedure declaration statement with a binding name may not declare multiple procedures
procedure(foo), BIND(C, NAME='myfptr') :: p1, p2, p3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Thanks for the quick fix! @klausler