[clang] [openmp] [Clang][OpenMP] Fix ordering of processing of map clauses when mapping a struct. (PR #72410)

Gheorghe-Teodor Bercea via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 21 07:15:20 PST 2023


================
@@ -7731,10 +7731,30 @@ class MappableExprsHandler {
               IsImplicit, Mapper, VarRef, ForDeviceAddr);
         };
 
+    // Sort all map clauses and make sure all the maps containing array
+    // sections are processed last.
+    llvm::SmallVector<const OMPMapClause *, 16> SortedMapClauses;
----------------
doru1004 wrote:

Implicit ordering isn't working in the case in the example above, please see the code. The entries are in the wrong order in the runtime and the problem starts here.

https://github.com/llvm/llvm-project/pull/72410


More information about the cfe-commits mailing list