aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/parse.h
diff options
context:
space:
mode:
authorChung-Lin Tang <cltang@codesourcery.com>2021-10-21 14:56:20 +0800
committerChung-Lin Tang <cltang@codesourcery.com>2021-10-21 14:57:25 +0800
commit2e4659199e814b7ee0f6bd925fd2c0a7610da856 (patch)
tree476464a5472b16f0039b949a5e6102bb85bea92f /gcc/fortran/parse.h
parent1af78e731feb9327a17c99ebaa19a4cca1125caf (diff)
downloadgcc-2e4659199e814b7ee0f6bd925fd2c0a7610da856.zip
gcc-2e4659199e814b7ee0f6bd925fd2c0a7610da856.tar.gz
gcc-2e4659199e814b7ee0f6bd925fd2c0a7610da856.tar.bz2
openmp: Fortran strictly-structured blocks support
This implements strictly-structured blocks support for Fortran, as specified in OpenMP 5.2. This now allows using a Fortran BLOCK construct as the body of most OpenMP constructs, with a "!$omp end ..." ending directive optional for that form. gcc/fortran/ChangeLog: * decl.c (gfc_match_end): Add COMP_OMP_STRICTLY_STRUCTURED_BLOCK case together with COMP_BLOCK. * parse.c (parse_omp_structured_block): Change return type to 'gfc_statement', add handling for strictly-structured block case, adjust recursive calls to parse_omp_structured_block. (parse_executable): Adjust calls to parse_omp_structured_block. * parse.h (enum gfc_compile_state): Add COMP_OMP_STRICTLY_STRUCTURED_BLOCK. * trans-openmp.c (gfc_trans_omp_workshare): Add EXEC_BLOCK case handling. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/cancel-1.f90: Adjust testcase. * gfortran.dg/gomp/nesting-3.f90: Adjust testcase. * gfortran.dg/gomp/strictly-structured-block-1.f90: New test. * gfortran.dg/gomp/strictly-structured-block-2.f90: New test. * gfortran.dg/gomp/strictly-structured-block-3.f90: New test. libgomp/ChangeLog: * libgomp.texi (Support of strictly structured blocks in Fortran): Adjust to 'Y'. * testsuite/libgomp.fortran/task-reduction-16.f90: Adjust testcase.
Diffstat (limited to 'gcc/fortran/parse.h')
-rw-r--r--gcc/fortran/parse.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/parse.h b/gcc/fortran/parse.h
index 55f0229..66b275d 100644
--- a/gcc/fortran/parse.h
+++ b/gcc/fortran/parse.h
@@ -31,7 +31,7 @@ enum gfc_compile_state
COMP_STRUCTURE, COMP_UNION, COMP_MAP,
COMP_DO, COMP_SELECT, COMP_FORALL, COMP_WHERE, COMP_CONTAINS, COMP_ENUM,
COMP_SELECT_TYPE, COMP_SELECT_RANK, COMP_OMP_STRUCTURED_BLOCK, COMP_CRITICAL,
- COMP_DO_CONCURRENT
+ COMP_DO_CONCURRENT, COMP_OMP_STRICTLY_STRUCTURED_BLOCK
};
/* Stack element for the current compilation state. These structures