[PATCH] D94505: [flang] Fix bogus message passing external procedure as an actual argument

Pete Steinfeld via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 12 09:43:56 PST 2021


PeteSteinfeld added a comment.

In D94505#2493131 <https://reviews.llvm.org/D94505#2493131>, @klausler wrote:

> If a dummy procedure has an explicit interface, the actual procedure must conform to it (15.5.2.9 paragraph 1).  Do your changes allow a actual procedure with an implicit interface to be associated with a dummy procedure with an explicit interface?

My changes allow a procedure declared as "external :: func" to be passed to a procedure dummy argument with an explicit interface.  This construct is allowed by pgf90, GNU, IBM, Intel, and NAG.  I've implemented this by checking "HasExplicitInterface()" on the characteristics of the actual argument.

I'm not sure how to think about all of this.  Does the standard require that a compiler reject a program when the compiler cannot verify at compile time if the characteristics are the same?  Are these other compilers not properly enforcing the standard?

I'll investigate other ways to declare procedures with implicit interfaces to see if my implementation is too broad.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94505/new/

https://reviews.llvm.org/D94505



More information about the llvm-commits mailing list