ShashwathiNavada wrote:

> Independent of your patch, the following seems to crash. Is it supposed to be 
> valid? Is there an open bug?
> 
> ```
> typedef struct myvec {
>     int a;
>     double *b;
> } myvec_t;
> void foo() {
> #pragma omp declare mapper(id: myvec_t v) map(iterator(it=0:v.a), tofrom: 
> v.b[it])
>   myvec_t s;
>   #pragma omp target map(mapper(id), to:s)
>   {
>   }
> }
> ```
I think the issue here is the missing memory allocation for _s_ in the 
testcase. So if we allocate memory for _s.b_ the program works fine.

https://github.com/llvm/llvm-project/pull/141507
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to