diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2023-10-24 10:43:40 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2023-10-25 10:49:55 +0200 |
commit | fa68e04e760bc971faa38ce9811a023ebe9d89bb (patch) | |
tree | 0b03f434b7eb44d5303974e8f9f5a7bd9d2934ec /gcc/fortran/frontend-passes.cc | |
parent | 5e71499275525283f2255b4574599316b7ae8a78 (diff) | |
download | gcc-fa68e04e760bc971faa38ce9811a023ebe9d89bb.zip gcc-fa68e04e760bc971faa38ce9811a023ebe9d89bb.tar.gz gcc-fa68e04e760bc971faa38ce9811a023ebe9d89bb.tar.bz2 |
OpenMP/Fortran: Group handling of 'if' clause without and with modifier
The 'if' clause with modifier was introduced in
commit b4c3a85be96585374bf95c981ba2f602667cf5b7 (Subversion r242037)
"Partial OpenMP 4.5 fortran support", but -- in some instances -- didn't place
it next to the existing handling of 'if' clause without modifier. Unify that;
no change in behavior.
gcc/fortran/
* dump-parse-tree.cc (show_omp_clauses): Group handling of 'if'
clause without and with modifier.
* frontend-passes.cc (gfc_code_walker): Likewise.
* gfortran.h (gfc_omp_clauses): Likewise.
* openmp.cc (gfc_free_omp_clauses): Likewise.
Diffstat (limited to 'gcc/fortran/frontend-passes.cc')
-rw-r--r-- | gcc/fortran/frontend-passes.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/frontend-passes.cc b/gcc/fortran/frontend-passes.cc index 536884b..0378e0d 100644 --- a/gcc/fortran/frontend-passes.cc +++ b/gcc/fortran/frontend-passes.cc @@ -5652,6 +5652,8 @@ gfc_code_walker (gfc_code **c, walk_code_fn_t codefn, walk_expr_fn_t exprfn, OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM }; size_t idx; WALK_SUBEXPR (co->ext.omp_clauses->if_expr); + for (idx = 0; idx < OMP_IF_LAST; idx++) + WALK_SUBEXPR (co->ext.omp_clauses->if_exprs[idx]); WALK_SUBEXPR (co->ext.omp_clauses->final_expr); WALK_SUBEXPR (co->ext.omp_clauses->num_threads); WALK_SUBEXPR (co->ext.omp_clauses->chunk_size); @@ -5667,8 +5669,6 @@ gfc_code_walker (gfc_code **c, walk_code_fn_t codefn, walk_expr_fn_t exprfn, WALK_SUBEXPR (co->ext.omp_clauses->num_tasks); WALK_SUBEXPR (co->ext.omp_clauses->priority); WALK_SUBEXPR (co->ext.omp_clauses->detach); - for (idx = 0; idx < OMP_IF_LAST; idx++) - WALK_SUBEXPR (co->ext.omp_clauses->if_exprs[idx]); for (idx = 0; idx < ARRAY_SIZE (list_types); idx++) for (n = co->ext.omp_clauses->lists[list_types[idx]]; n; n = n->next) |