On 02/01/2016 09:57 AM, Cesar Philippidis wrote: > This patch fixes a couple of bugs preventing c++ reference-typed > variables from working in openacc data clauses. These fixes include: > > * Teach the gimplifier to filter out pointer data mappings for > OACC_DATA, OACC_ENTER_DATA, OACC_EXIT_DATA and OACC_UPDATE regions. > Along with using a firsptrivate mapping for the array base pointers > in OACC_DATA, OACC_PARALLEL and OACC_KERNELS regions. > > * Make the data mapping errors emitted by the c and c++ front ends > more consistent with openacc by reporting data mapping errors, not > omp-specific map errors. > > * Add some light checking for duplicate reference mappings in c++. The > c++ FE still fails to detect duplicate component refs, but that's not > working in openacc at the moment, anyway. > > Jakub, the latter issue also affects openmp. I've added a simple openmp > test case, but it could probably be more extensive. Can you add more > test coverage or tell me what should be included? While working on a different reduction problem, I noticed that both the c and c++ front end's are treating reductions as generic data clauses. That means, parallel reductions of the form #pragma acc copy(foo) reduction(+:foo) would get treated as an error. This patch fixes that, in addition to the changes listed above. Is this patch ok for trunk? Cesar