Skip to content

Commit 8472f68

Browse files
committed
[Flang][OpenMP] Only allow implicit mappers for Allocatables.
Generate implicit declare mappers only for Allocatables. Fixes llvm#169382 introduced by llvm#140562.
1 parent 3402391 commit 8472f68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Lower/OpenMP/Utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ bool requiresImplicitDefaultDeclareMapper(
189189

190190
semantics::DirectComponentIterator directComponents{spec};
191191
for (const semantics::Symbol &component : directComponents) {
192-
if (semantics::IsAllocatableOrPointer(component))
192+
if (component.attrs().test(semantics::Attr::ALLOCATABLE))
193193
return true;
194194

195195
if (const semantics::DeclTypeSpec *declType = component.GetType())

0 commit comments

Comments
 (0)