[PATCH] D145093: Add map info for dereference pointer.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 1 16:30:03 PST 2023


ABataev added inline comments.


================
Comment at: clang/test/OpenMP/target_map_deref_array_codegen.cpp:17
+    (*t1d)[j] = 1;
+  #pragma omp target map(to: (*t1d)[0:3])
+    (*t1d)[2] = 2;
----------------
jyu2 wrote:
> ABataev wrote:
> > Is this correct at all? This is not a pointer to the array, it is an array of pointers, IIRC.
> I am confuse about those two(pointer to array or array of pointer).  I thinks 
>    int **tid ===  int (*t1d)[3], 
> it is pointer to array.  
Nope. The first one is an array of pointers, the second - the pointer to the array of ints. They are different.

https://stackoverflow.com/questions/20120054/pointer-to-an-array-and-array-of-pointers


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145093/new/

https://reviews.llvm.org/D145093



More information about the cfe-commits mailing list