[flang-commits] [PATCH] D91657: [flang] Correct handling of null pointer initializers
Pete Steinfeld via Phabricator via flang-commits
flang-commits at lists.llvm.org
Tue Nov 17 20:35:32 PST 2020
PeteSteinfeld accepted this revision.
PeteSteinfeld added a comment.
This revision is now accepted and ready to land.
Aside from the noted items, all builds, tests, and looks good.
================
Comment at: flang/lib/Semantics/resolve-names.cpp:5737
}
- if (auto *details{ultimate.detailsIf<ObjectEntityDetails>()}) {
+ if (auto *object{ultimate.detailsIf<ObjectEntityDetails>()}) {
// TODO: check C762 - all bounds and type parameters of component
----------------
Something weird is going on with this file. When I look at this file in my downloaded version, this line that begins with "if (auto" is at line 5733 rather than line 5737 as this display shows.
It looks to me like your version of the file doesn't contain the changes from D91560. Please be sure to integrate those changes before merging.
================
Comment at: flang/lib/Semantics/resolve-names.cpp:5744-5746
+ if (IsPointer(ultimate)) {
+ Say(name,
+ "Object pointer component '%s' initialized with non-pointer expression"_err_en_US);
----------------
It would be good to have a test for this.
================
Comment at: flang/lib/Semantics/resolve-names.cpp:5758-5759
+ } else {
+ Say(name,
+ "Non-pointer component '%s' initialized with null pointer"_err_en_US);
+ }
----------------
It would be good to have a test for this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91657/new/
https://reviews.llvm.org/D91657
More information about the flang-commits
mailing list