]> gcc.gnu.org Git - gcc.git/commit
C, C++, Fortran, OpenMP: Add support for 'flush seq_cst' construct.
authorMarcel Vollweiler <marcel@codesourcery.com>
Tue, 7 Sep 2021 11:07:02 +0000 (04:07 -0700)
committerMarcel Vollweiler <marcel@codesourcery.com>
Tue, 7 Sep 2021 11:07:02 +0000 (04:07 -0700)
commit777e1baddca0ed779eab4f13ba79359124892490
tree801c9b20b259891707d8753c03fa20ba6e88160b
parenta5643a2981ba075bc80ec2d2f8e5ad3c22e9d58d
C, C++, Fortran, OpenMP: Add support for 'flush seq_cst' construct.

This patch adds support for the 'seq_cst' memory order clause on the 'flush'
directive which was introduced in OpenMP 5.1.

gcc/c-family/ChangeLog:

* c-omp.c (c_finish_omp_flush): Handle MEMMODEL_SEQ_CST.

gcc/c/ChangeLog:

* c-parser.c (c_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
directive.

gcc/cp/ChangeLog:

* parser.c (cp_parser_omp_flush): Parse 'seq_cst' clause on 'flush'
directive.
* semantics.c (finish_omp_flush): Handle MEMMODEL_SEQ_CST.

gcc/fortran/ChangeLog:

* openmp.c (gfc_match_omp_flush): Parse 'seq_cst' clause on 'flush'
directive.
* trans-openmp.c (gfc_trans_omp_flush): Handle OMP_MEMORDER_SEQ_CST.

gcc/testsuite/ChangeLog:

* c-c++-common/gomp/flush-1.c: Add test case for 'seq_cst'.
* c-c++-common/gomp/flush-2.c: Add test case for 'seq_cst'.
* g++.dg/gomp/attrs-1.C: Adapt test to handle all flush clauses.
* g++.dg/gomp/attrs-2.C: Adapt test to handle all flush clauses.
* gfortran.dg/gomp/flush-1.f90: Add test case for 'seq_cst'.
* gfortran.dg/gomp/flush-2.f90: Add test case for 'seq_cst'.

(cherry picked from commit ba1cc6956b956eb5b92c45af79a8b1fe426ec4d3)
13 files changed:
gcc/ChangeLog.omp
gcc/c-family/c-omp.c
gcc/c/c-parser.c
gcc/cp/parser.c
gcc/cp/semantics.c
gcc/fortran/openmp.c
gcc/fortran/trans-openmp.c
gcc/testsuite/c-c++-common/gomp/flush-1.c
gcc/testsuite/c-c++-common/gomp/flush-2.c
gcc/testsuite/g++.dg/gomp/attrs-1.C
gcc/testsuite/g++.dg/gomp/attrs-2.C
gcc/testsuite/gfortran.dg/gomp/flush-1.f90
gcc/testsuite/gfortran.dg/gomp/flush-2.f90
This page took 0.074208 seconds and 6 git commands to generate.