[all-commits] [llvm/llvm-project] bfc390: [flang] Fix spurious errors from MODULE subprograms

Peter Klausler via All-commits all-commits at lists.llvm.org
Fri Sep 23 13:12:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bfc39073692550132f49c22f848ad145f7350fbf
      https://github.com/llvm/llvm-project/commit/bfc39073692550132f49c22f848ad145f7350fbf
  Author: Peter Klausler <pklausler at nvidia.com>
  Date:   2022-09-23 (Fri, 23 Sep 2022)

  Changed paths:
    M flang/include/flang/Semantics/symbol.h
    M flang/lib/Semantics/program-tree.cpp
    M flang/lib/Semantics/resolve-names.cpp
    M flang/lib/Semantics/symbol.cpp
    M flang/test/Semantics/nullify02.f90

  Log Message:
  -----------
  [flang] Fix spurious errors from MODULE subprograms

When an explicit MODULE procedure is defined in the same (sub)module
as its interface, and the interface was defined in a generic
interface of the same name, bogus errors about symbols already
having been defined will ensue.  Cleaning up this aspect of name
resolution and symbol table management requires marking the
place-holding SubprogramNameDetails symbols of explicit MODULE
subprograms as such, ensuring that that attribute is not inherited
if the SubprogramNameDetails symbol is recycled as a SubprogramDetails,
and gathering some code that should have been common between
BeginSubprogram() and BeginMpSubprogram() together in one
new routine.

Differential Revision: https://reviews.llvm.org/D134446




More information about the All-commits mailing list