[all-commits] [llvm/llvm-project] 396865: [flang] Accommodate module subprograms defined in ...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Wed Mar 2 13:07:35 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 396865576f9fabfd03d03249d0e1a97e3b49798d
https://github.com/llvm/llvm-project/commit/396865576f9fabfd03d03249d0e1a97e3b49798d
Author: Peter Klausler <pklausler at nvidia.com>
Date: 2022-03-02 (Wed, 02 Mar 2022)
Changed paths:
M flang/include/flang/Semantics/symbol.h
M flang/lib/Semantics/check-declarations.cpp
M flang/lib/Semantics/resolve-names.cpp
M flang/lib/Semantics/symbol.cpp
M flang/lib/Semantics/tools.cpp
M flang/test/Semantics/nullify02.f90
M flang/test/Semantics/separate-mp02.f90
A flang/test/Semantics/separate-mp03.f90
Log Message:
-----------
[flang] Accommodate module subprograms defined in the same module
The symbol table, name resolution, and semantic checks for module
subprograms -- esp. for MODULE FUNCTION and MODULE SUBROUTINE, but
also MODULE PROCEDURE -- essentially assumed that the subprogram
would be defined in a submodule of the (sub)module containing its
interface. However, it is conforming to instead declare a module
subprogram in the *same* (sub)module as its interface, and we need
to handle that case.
Since this case involves two symbols in the same scope with the same
name, the symbol table details for subprograms have been extended
with a pointer to the original module interface, rather than relying
on searching in scopes.
Differential Revision: https://reviews.llvm.org/D120839
More information about the All-commits
mailing list