]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add parsing support for allocate directive (OpenMP 5.0)
authorHafiz Abid Qadeer <abidh@codesourcery.com>
Wed, 9 Mar 2022 11:36:04 +0000 (11:36 +0000)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 16 May 2023 18:15:44 +0000 (19:15 +0100)
commit6ce5ee77f738cebaeed4e1c641ecaa4fb26aebd1
treeb70b9536d1e7ef784b08f230d369f36a41ca1e8a
parent70008a509c5a9da24f388e3569cdcee0ad8f8490
Add parsing support for allocate directive (OpenMP 5.0)

Currently we only make use of this directive when it is associated
with an allocate statement.

gcc/fortran/ChangeLog:

* dump-parse-tree.cc (show_omp_node): Handle EXEC_OMP_ALLOCATE.
(show_code_node): Likewise.
* gfortran.h (enum gfc_statement): Add ST_OMP_ALLOCATE.
(OMP_LIST_ALLOCATOR): New enum value.
(enum gfc_exec_op): Add EXEC_OMP_ALLOCATE.
* match.h (gfc_match_omp_allocate): New function.
* openmp.cc (enum omp_mask1): Add OMP_CLAUSE_ALLOCATOR.
(OMP_ALLOCATE_CLAUSES): New define.
(gfc_match_omp_allocate): New function.
(resolve_omp_clauses): Add ALLOCATOR in clause_names.
(omp_code_to_statement): Handle EXEC_OMP_ALLOCATE.
(EMPTY_VAR_LIST): New define.
(check_allocate_directive_restrictions): New function.
(gfc_resolve_omp_allocate): Likewise.
(gfc_resolve_omp_directive): Handle EXEC_OMP_ALLOCATE.
* parse.cc (decode_omp_directive): Handle ST_OMP_ALLOCATE.
(next_statement): Likewise.
(gfc_ascii_statement): Likewise.
* resolve.cc (gfc_resolve_code): Handle EXEC_OMP_ALLOCATE.
* st.cc (gfc_free_statement): Likewise.
* trans.cc (trans_code): Likewise
gcc/fortran/ChangeLog.omp
gcc/fortran/dump-parse-tree.cc
gcc/fortran/gfortran.h
gcc/fortran/match.h
gcc/fortran/openmp.cc
gcc/fortran/parse.cc
gcc/fortran/resolve.cc
gcc/fortran/st.cc
gcc/fortran/trans.cc
gcc/testsuite/gfortran.dg/gomp/allocate-4.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/gomp/allocate-5.f90 [new file with mode: 0644]