[flang-commits] [flang] 01737c1 - [Flang][OpenMP] Only allow implicit mappers for Allocatables. (#170701)

via flang-commits flang-commits at lists.llvm.org
Thu Dec 4 10:28:39 PST 2025


Author: Akash Banerjee
Date: 2025-12-04T18:28:35Z
New Revision: 01737c1fd1d61567b7261912f23f5aca2b38670d

URL: https://github.com/llvm/llvm-project/commit/01737c1fd1d61567b7261912f23f5aca2b38670d
DIFF: https://github.com/llvm/llvm-project/commit/01737c1fd1d61567b7261912f23f5aca2b38670d.diff

LOG: [Flang][OpenMP] Only allow implicit mappers for Allocatables. (#170701)

Generate implicit declare mappers only for Allocatables.

Fixes #169382 introduced by #140562.

Added: 
    

Modified: 
    flang/lib/Lower/OpenMP/Utils.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/OpenMP/Utils.cpp b/flang/lib/Lower/OpenMP/Utils.cpp
index ccac64335c29a..a818d635668de 100644
--- a/flang/lib/Lower/OpenMP/Utils.cpp
+++ b/flang/lib/Lower/OpenMP/Utils.cpp
@@ -189,7 +189,7 @@ bool requiresImplicitDefaultDeclareMapper(
 
     semantics::DirectComponentIterator directComponents{spec};
     for (const semantics::Symbol &component : directComponents) {
-      if (semantics::IsAllocatableOrPointer(component))
+      if (component.attrs().test(semantics::Attr::ALLOCATABLE))
         return true;
 
       if (const semantics::DeclTypeSpec *declType = component.GetType())


        


More information about the flang-commits mailing list