re PR middle-end/70626 (bogus results in 'acc parallel loop' reductions)
authorCesar Philippidis <cesar@codesourcery.com>
Fri, 29 Apr 2016 17:42:04 +0000 (10:42 -0700)
committerCesar Philippidis <cesar@gcc.gnu.org>
Fri, 29 Apr 2016 17:42:04 +0000 (10:42 -0700)
commite7ff0319f3736617c70742d8233d73faad523aa3
treee916d372dc0f2cd85d00c0e3d0572f145a5da73c
parente49aacaf3083a99dc266209ed91183e91b11ffad
re PR middle-end/70626 (bogus results in 'acc parallel loop' reductions)

gcc/c-family/
PR middle-end/70626
* c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
* c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
reduction clauses in acc parallel loops.

gcc/c/
PR middle-end/70626
* c-parser.c (c_parser_oacc_loop): Don't augment mask with
OACC_LOOP_CLAUSE_MASK.
(c_parser_oacc_kernels_parallel): Update call to
c_oacc_split_loop_clauses.

gcc/cp/
PR middle-end/70626
* parser.c (cp_parser_oacc_loop): Don't augment mask with
OACC_LOOP_CLAUSE_MASK.
(cp_parser_oacc_kernels_parallel): Update call to
c_oacc_split_loop_clauses.

gcc/fortran/
PR middle-end/70626
* trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
the reduction clause in both parallel and loop directives.

gcc/testsuite/
PR middle-end/70626
* c-c++-common/goacc/combined-reduction.c: New test.
* gfortran.dg/goacc/reduction-2.f95: Add check for kernels reductions.

libgomp/
PR middle-end/70626
* testsuite/libgomp.oacc-c++/template-reduction.C: Adjust test.
* testsuite/libgomp.oacc-c-c++-common/combined-reduction.c: New test.
* testsuite/libgomp.oacc-fortran/combined-reduction.f90: New test.

From-SVN: r235651
16 files changed:
gcc/c-family/ChangeLog
gcc/c-family/c-common.h
gcc/c-family/c-omp.c
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/fortran/ChangeLog
gcc/fortran/trans-openmp.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/goacc/combined-reduction.c [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/reduction-2.f95
libgomp/ChangeLog
libgomp/testsuite/libgomp.oacc-c++/template-reduction.C
libgomp/testsuite/libgomp.oacc-c-c++-common/combined-reduction.c [new file with mode: 0644]
libgomp/testsuite/libgomp.oacc-fortran/combined-reduction.f90 [new file with mode: 0644]