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/dump-parse-tree.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/dump-parse-tree.cc')
-rw-r--r-- | gcc/fortran/dump-parse-tree.cc | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/gcc/fortran/dump-parse-tree.cc b/gcc/fortran/dump-parse-tree.cc index 68122e3..cc4846e 100644 --- a/gcc/fortran/dump-parse-tree.cc +++ b/gcc/fortran/dump-parse-tree.cc @@ -1593,6 +1593,27 @@ show_omp_clauses (gfc_omp_clauses *omp_clauses) show_expr (omp_clauses->if_expr); fputc (')', dumpfile); } + for (i = 0; i < OMP_IF_LAST; i++) + if (omp_clauses->if_exprs[i]) + { + static const char *ifs[] = { + "CANCEL", + "PARALLEL", + "SIMD", + "TASK", + "TASKLOOP", + "TARGET", + "TARGET DATA", + "TARGET UPDATE", + "TARGET ENTER DATA", + "TARGET EXIT DATA" + }; + fputs (" IF(", dumpfile); + fputs (ifs[i], dumpfile); + fputs (": ", dumpfile); + show_expr (omp_clauses->if_exprs[i]); + fputc (')', dumpfile); + } if (omp_clauses->final_expr) { fputs (" FINAL(", dumpfile); @@ -1999,27 +2020,6 @@ show_omp_clauses (gfc_omp_clauses *omp_clauses) show_expr (omp_clauses->detach); fputc (')', dumpfile); } - for (i = 0; i < OMP_IF_LAST; i++) - if (omp_clauses->if_exprs[i]) - { - static const char *ifs[] = { - "CANCEL", - "PARALLEL", - "SIMD", - "TASK", - "TASKLOOP", - "TARGET", - "TARGET DATA", - "TARGET UPDATE", - "TARGET ENTER DATA", - "TARGET EXIT DATA" - }; - fputs (" IF(", dumpfile); - fputs (ifs[i], dumpfile); - fputs (": ", dumpfile); - show_expr (omp_clauses->if_exprs[i]); - fputc (')', dumpfile); - } if (omp_clauses->destroy) fputs (" DESTROY", dumpfile); if (omp_clauses->depend_source) |