diff options
author | Peter Klausler <pklausler@nvidia.com> | 2022-05-04 14:10:18 -0700 |
---|---|---|
committer | Peter Klausler <pklausler@nvidia.com> | 2022-05-09 18:37:09 -0700 |
commit | 8594b051fb40312e991d94f0c7eb09accd8ac822 (patch) | |
tree | 070badc9aabd9ae2bebf782dc6843dea055e2002 /flang/lib/Lower/ConvertType.cpp | |
parent | f6d4769894484bc9e89f83d12679e3dc31c4b4eb (diff) | |
download | llvm-8594b051fb40312e991d94f0c7eb09accd8ac822.zip llvm-8594b051fb40312e991d94f0c7eb09accd8ac822.tar.gz llvm-8594b051fb40312e991d94f0c7eb09accd8ac822.tar.bz2 |
[flang] Accept POINTER followed by INTERFACE
As is already supported for dummy procedures, we need to also accept
declarations of procedure pointers that consist of a POINTER attribute
statement followed by an INTERFACE block. (The case of an INTERFACE
block followed by a POINTER statement already works.)
While cleaning this case up, adjust the utility predicate IsProcedurePointer()
to recognize it (namely a SubprogramDetails symbol with Attr::POINTER)
and delete IsProcName(). Extend tests, and add better comments to
symbol.h to document the two ways in which procedure pointers are
represented.
Differential Revision: https://reviews.llvm.org/D125139
Diffstat (limited to 'flang/lib/Lower/ConvertType.cpp')
-rw-r--r-- | flang/lib/Lower/ConvertType.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/flang/lib/Lower/ConvertType.cpp b/flang/lib/Lower/ConvertType.cpp index fa29e54..056490e 100644 --- a/flang/lib/Lower/ConvertType.cpp +++ b/flang/lib/Lower/ConvertType.cpp @@ -301,7 +301,7 @@ struct TypeBuilder { if (componentHasNonDefaultLowerBounds(field)) TODO(converter.genLocation(field.name()), "lowering derived type components with non default lower bounds"); - if (IsProcName(field)) + if (IsProcedure(field)) TODO(converter.genLocation(field.name()), "procedure components"); mlir::Type ty = genSymbolType(field); // Do not add the parent component (component of the parents are |