If the mapped structure has data members, which have 'default' mappers,
need to map these members individually using their 'default' mappers.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
The patch currently asserts for the following:
#include <stdio.h> typedef struct { int a; double *b; } C; #pragma omp declare mapper(default: C s) map(s.a, s.b[0:2]) int main() { C s; s.a = 10; double x[2]; x[0] = 20; s.b = &x[0]; C* sp = &s; C** spp = &sp; printf("%d %lf %p\n", spp[0][0].a, spp[0][0].b[0], spp[0][0].b); #pragma omp target map(tofrom:spp[0][0]) printf("%d %lf %p\n", spp[0][0].a, spp[0][0].b[0], spp[0][0].b); }
Note that this doesn't work correctly before this patch either. This changes it from a runfail to a compfail.
Comment Actions
Libomptarget changes look good, I'll let @jdoerfert provide feedback for the clang part.