dump-parse-tree.c (show_omp_clauses): Handle optional num and static arguments for...
authorCesar Philippidis <cesar@codesourcery.com>
Tue, 1 Dec 2015 14:27:11 +0000 (06:27 -0800)
committerCesar Philippidis <cesar@gcc.gnu.org>
Tue, 1 Dec 2015 14:27:11 +0000 (06:27 -0800)
commit2a70708e0bf8389e7f7566f39ef2e3891ecc839d
tree9c6035c5b4ecd42e5ff36d1590932fb6e64bd6e3
parent4f0a0218d6df34ec612a61aef50b95d79cd8d17f
dump-parse-tree.c (show_omp_clauses): Handle optional num and static arguments for the gang clause.

gcc/fortran/
* dump-parse-tree.c (show_omp_clauses): Handle optional num and static
arguments for the gang clause.
* gfortran.h (gfc_omp_clauses): Rename gang_expr as gang_num_expr.
Add gang_static_expr.
* openmp.c (gfc_free_omp_clauses): Update to free gang_num_expr and
gang_static_expr.
(match_oacc_clause_gang): Update to support both num and static in
the same clause.
(resolve_omp_clauses): Formatting.  Also handle gang_num_expr and
gang_static_expr.
(resolve_oacc_params_in_parallel): New const char arg argument.
Use it to report more accurate gang, worker and vector clause errors.
(resolve_oacc_loop_blocks): Update calls to
resolve_oacc_params_in_parallel.
* trans-openmp.c (gfc_trans_omp_clauses): Update the gimplification of
the gang clause.
(gfc_trans_oacc_combined_directive): Make use of gang_num_expr and
gang_static_expr.  Remove OMP_LIST_REDUCTION from construct_clauses.

gcc/testsuite/
* gfortran.dg/goacc/gang-static.f95: Add tests for gang num arguments.
* gfortran.dg/goacc/loop-2.f95: Update expected diagnostics.
* gfortran.dg/goacc/loop-6.f95: Likewise.
* gfortran.dg/goacc/loop-7.f95: New test.
* gfortran.dg/goacc/reduction-2.f95: New test.

From-SVN: r231112
gcc/fortran/ChangeLog
gcc/fortran/dump-parse-tree.c
gcc/fortran/gfortran.h
gcc/fortran/openmp.c
gcc/fortran/trans-openmp.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/goacc/gang-static.f95
gcc/testsuite/gfortran.dg/goacc/loop-2.f95
gcc/testsuite/gfortran.dg/goacc/loop-6.f95
gcc/testsuite/gfortran.dg/goacc/loop-7.f95 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/reduction-2.f95 [new file with mode: 0644]