Skip to content

Commit 170e463

Browse files
Code review feedback: display the name of ultimate ALLOCATABLE component
1 parent 06f1671 commit 170e463

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

flang/lib/Semantics/resolve-names.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7281,8 +7281,8 @@ bool DeclarationVisitor::PassesLocalityChecks(
72817281
if (const DerivedTypeSpec *derived{type->AsDerived()}) { // F'2023 C1130
72827282
if (auto bad{FindAllocatableUltimateComponent(*derived)}) {
72837283
SayWithDecl(name, symbol,
7284-
"Derived type variable '%s' with ultimate ALLOCATABLE component not allowed in a %s locality-spec"_err_en_US,
7285-
specName);
7284+
"Derived type variable '%s' with ultimate ALLOCATABLE component '%s' not allowed in a %s locality-spec"_err_en_US,
7285+
bad.BuildResultDesignatorName(), specName);
72867286
return false;
72877287
}
72887288
}

flang/test/Semantics/resolve55.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ subroutine s9()
109109
integer sum
110110

111111
sum = 0
112-
!ERROR: Derived type variable 'v' with ultimate ALLOCATABLE component not allowed in a LOCAL_INIT locality-spec
112+
!ERROR: Derived type variable 'v' with ultimate ALLOCATABLE component '%l1_2%l2_3%a' not allowed in a LOCAL_INIT locality-spec
113113
do concurrent (i = 1:10) local_init(v)
114114
sum = sum + i
115115
end do

0 commit comments

Comments
 (0)