aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/st.c
diff options
context:
space:
mode:
authorTobias Burnus <tobias@codesourcery.com>2020-10-30 15:57:46 +0100
committerTobias Burnus <tobias@codesourcery.com>2020-10-30 15:57:46 +0100
commit1fc5e7ef98e1063953c7a610e99bec2c95b7b010 (patch)
tree8fa78bc22948839e36c08f990baaed271bec1dd4 /gcc/fortran/st.c
parentaa701610e51ca9e15573ba080cb93ef726252cfc (diff)
downloadgcc-1fc5e7ef98e1063953c7a610e99bec2c95b7b010.zip
gcc-1fc5e7ef98e1063953c7a610e99bec2c95b7b010.tar.gz
gcc-1fc5e7ef98e1063953c7a610e99bec2c95b7b010.tar.bz2
Fortran: Update omp atomic for OpenMP 5
gcc/fortran/ChangeLog: * dump-parse-tree.c (show_omp_clauses): Handle atomic clauses. (show_omp_node): Call it for atomic. * gfortran.h (enum gfc_omp_atomic_op): Add GFC_OMP_ATOMIC_UNSET, remove GFC_OMP_ATOMIC_SEQ_CST and GFC_OMP_ATOMIC_ACQ_REL. (enum gfc_omp_memorder): Replace OMP_MEMORDER_LAST by OMP_MEMORDER_UNSET, add OMP_MEMORDER_SEQ_CST/OMP_MEMORDER_RELAXED. (gfc_omp_clauses): Add capture and atomic_op. (gfc_code): remove omp_atomic. * openmp.c (enum omp_mask1): Add atomic, capture, memorder clauses. (gfc_match_omp_clauses): Match them. (OMP_ATOMIC_CLAUSES): Add. (gfc_match_omp_flush): Update for 'last' to 'unset' change. (gfc_match_omp_oacc_atomic): Removed and placed content .. (gfc_match_omp_atomic): ... here. Update for OpenMP 5 clauses. (gfc_match_oacc_atomic): Match directly here. (resolve_omp_atomic, gfc_resolve_omp_directive): Update. * parse.c (parse_omp_oacc_atomic): Update for struct gfc_code changes. * resolve.c (gfc_resolve_blocks): Update assert. * st.c (gfc_free_statement): Also call for EXEC_O{ACC,MP}_ATOMIC. * trans-openmp.c (gfc_trans_omp_atomic): Update. (gfc_trans_omp_flush): Update for 'last' to 'unset' change. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/atomic-2.f90: New test. * gfortran.dg/gomp/atomic.f90: New test.
Diffstat (limited to 'gcc/fortran/st.c')
-rw-r--r--gcc/fortran/st.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/st.c b/gcc/fortran/st.c
index f6937b9..a3b0f12 100644
--- a/gcc/fortran/st.c
+++ b/gcc/fortran/st.c
@@ -198,6 +198,7 @@ gfc_free_statement (gfc_code *p)
gfc_free_oacc_declare_clauses (p->ext.oacc_declare);
break;
+ case EXEC_OACC_ATOMIC:
case EXEC_OACC_PARALLEL_LOOP:
case EXEC_OACC_PARALLEL:
case EXEC_OACC_KERNELS_LOOP:
@@ -213,6 +214,7 @@ gfc_free_statement (gfc_code *p)
case EXEC_OACC_ENTER_DATA:
case EXEC_OACC_EXIT_DATA:
case EXEC_OACC_ROUTINE:
+ case EXEC_OMP_ATOMIC:
case EXEC_OMP_CANCEL:
case EXEC_OMP_CANCELLATION_POINT:
case EXEC_OMP_CRITICAL:
@@ -266,8 +268,6 @@ gfc_free_statement (gfc_code *p)
gfc_free_omp_namelist (p->ext.omp_namelist);
break;
- case EXEC_OACC_ATOMIC:
- case EXEC_OMP_ATOMIC:
case EXEC_OMP_BARRIER:
case EXEC_OMP_MASTER:
case EXEC_OMP_END_NOWAIT: