]> git.ipfire.org Git - thirdparty/gcc.git/commit
Translate allocate directive (OpenMP 5.0).
authorHafiz Abid Qadeer <abidh@codesourcery.com>
Wed, 9 Mar 2022 11:52:49 +0000 (11:52 +0000)
committerHafiz Abid Qadeer <abidh@codesourcery.com>
Thu, 10 Mar 2022 13:50:34 +0000 (13:50 +0000)
commit7a8f9f47a7c5ec25b2cc472f76505761944666cc
tree9c3c2705ecc1c8faab852be54030ebdb45656641
parentecb0ebd430e81e8b27bdc11a097fb3357979b8b1
Translate allocate directive (OpenMP 5.0).

Backport of a patch posted at
https://gcc.gnu.org/pipermail/gcc-patches/2022-January/588369.html

gcc/fortran/ChangeLog:

* trans-openmp.c (gfc_trans_omp_clauses): Handle OMP_LIST_ALLOCATOR.
(gfc_trans_omp_allocate): New function.
(gfc_trans_omp_directive): Handle EXEC_OMP_ALLOCATE.

gcc/ChangeLog:

* tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_ALLOCATOR.
(dump_generic_node): Handle OMP_ALLOCATE.
* tree.def (OMP_ALLOCATE): New.
* tree.h (OMP_ALLOCATE_CLAUSES): Likewise.
(OMP_ALLOCATE_DECL): Likewise.
(OMP_ALLOCATE_ALLOCATOR): Likewise.
* tree.c (omp_clause_num_ops): Add entry for OMP_CLAUSE_ALLOCATOR.

gcc/testsuite/ChangeLog:

* gfortran.dg/gomp/allocate-6.f90: New test.
gcc/ChangeLog.omp
gcc/fortran/ChangeLog.omp
gcc/fortran/trans-openmp.c
gcc/testsuite/ChangeLog.omp
gcc/testsuite/gfortran.dg/gomp/allocate-6.f90 [new file with mode: 0644]
gcc/tree-core.h
gcc/tree-pretty-print.c
gcc/tree.c
gcc/tree.def
gcc/tree.h