[all-commits] [llvm/llvm-project] bebbe6: [flang] Fix creation of deferred shape arrays by P...
Pete Steinfeld via All-commits
all-commits at lists.llvm.org
Wed Jan 20 13:14:50 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bebbe64075abf9d9887a8e1ee39c1ecefe970954
https://github.com/llvm/llvm-project/commit/bebbe64075abf9d9887a8e1ee39c1ecefe970954
Author: Peter Steinfeld <psteinfeld at nvidia.com>
Date: 2021-01-20 (Wed, 20 Jan 2021)
Changed paths:
M flang/lib/Semantics/resolve-names-utils.cpp
M flang/lib/Semantics/resolve-names-utils.h
M flang/lib/Semantics/resolve-names.cpp
M flang/test/Semantics/allocate12.f90
Log Message:
-----------
[flang] Fix creation of deferred shape arrays by POINTER statement
It's possible to declare deferred shape array using the POINTER
statement, for example:
POINTER :: var(:)
When analyzing POINTER declarations, we were not capturing the array
specification information, if present. I fixed this by changing the
"Post" function for "parser::PointerDecl" to check to see if the
declaration contained a "DeferredShapeSpecList". In such cases, I
analyzed the shape and used to information to declare an "ObjectEntity"
that contains the shape information rather than an "UnknownEntity".
I also added a couple of small tests that fail to compile without these
changes.
Differential Revision: https://reviews.llvm.org/D95080
More information about the All-commits
mailing list