[PATCH] D93572: [flang] Fix bugs in .mod file for abstract interface

Tim Keith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 18 16:50:34 PST 2020


tskeith created this revision.
tskeith added reviewers: klausler, PeteSteinfeld.
tskeith added a project: Flang.
Herald added subscribers: jdoerfert, mgrang.
tskeith requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

When an abstract interface is defined, add the ABSTRACT attribute to
subprogram symbols that define the interface body. Make use of that
when writing .mod files to include "abstract" on the interface statement.

Also, fix a problem with the order of symbols in a .mod file. Sometimes
a name is mentioned before the "real" declaration, e.g. in an access
statement. We want the order to be based on the real definitions. In
these cases we replace the symbol name with an identical name with a
different source location. Then by sorting based on the source location
we get symbols in the right order.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93572

Files:
  flang/lib/Semantics/mod-file.cpp
  flang/lib/Semantics/resolve-names.cpp
  flang/test/Semantics/modfile10.f90
  flang/test/Semantics/procinterface01.f90
  flang/test/Semantics/symbol15.f90

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93572.312903.patch
Type: text/x-patch
Size: 3845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201219/7103cf5a/attachment.bin>


More information about the llvm-commits mailing list