[flang-commits] [flang] [flang] Check for ultimate ALLOCATABLE component in LOCAL_INIT() (PR #145800)
Peter Klausler via flang-commits
flang-commits at lists.llvm.org
Wed Jun 25 15:47:50 PDT 2025
================
@@ -7278,6 +7278,14 @@ bool DeclarationVisitor::PassesLocalityChecks(
specName);
return false;
}
+ if (const DerivedTypeSpec *derived{type->AsDerived()}) { // F'2023 C1130
+ if (auto bad{FindAllocatableUltimateComponent(*derived)}) {
----------------
klausler wrote:
The variable `bad` is not used, but it should be; you can get the name of the offending component from it and include it in the message, as is usually done in other situations that use the component iterators.
https://github.com/llvm/llvm-project/pull/145800
More information about the flang-commits
mailing list