]>
git.ipfire.org Git - thirdparty/gcc.git/commit
OpenMP: Fortran "!$omp declare mapper" parser support
gcc/fortran/ChangeLog:
* dump-parse-tree.cc (show_attr): Show omp_udm_artificial_var flag.
(show_omp_namelist): Support OMP_MAP_UNSET.
* gfortran.h (enum gfc_statement): Add ST_OMP_DECLARE_MAPPER.
(symbol_attribute): Add omp_udm_artificial_var attribute.
(enum gfc_omp_map_op): Add OMP_MAP_UNSET.
(gfc_omp_namelist_udm): New struct.
(gfc_omp_namelist): Add udm pointer to u2 union.
(gfc_symtree): Add omp_udm pointer.
(gfc_namespace): Add omp_udm_root symtree and omp_udm_ns flag.
(gfc_free_omp_udm, gfc_omp_udm_find, gfc_find_omp_udm,
gfc_resolve_omp_udms): Add prototypes.
* match.h (gfc_match_omp_declare_mapper): Add prototype.
* match.cc (gfc_free_omp_namelist): Update for declare mapper's udm.
* openmp.cc (gfc_omp_directives): Uncomment 'declare mapper'.
(gfc_free_omp_udm, gfc_find_omp_udm, gfc_omp_udm_find,
gfc_match_omp_declare_mapper, gfc_resolve_omp_udm,
gfc_resolve_omp_udms): New.
(gfc_match_omp_clauses): Take argument for the default map-type
modifier; add support for the 'mapper' modifier.
(resolve_omp_clauses): Update for declare-mapper map clauses.
* parse.cc (decode_omp_directive): Add declare mapper support.
(case_omp_decl): Add ST_OMP_DECLARE_MAPPER case.
(gfc_ascii_statement): Add ST_OMP_DECLARE_MAPPER case.
* resolve.cc (resolve_types): Call gfc_resolve_omp_udms.
* symbol.cc (free_omp_udm_tree): New function.
(gfc_free_namespace): Call it.
gcc/testsuite/ChangeLog:
* gfortran.dg/gomp/declare-mapper-1.f90: New test.
* gfortran.dg/gomp/declare-mapper-2.f90: New test.
Co-Authored-By: Tobias Burnus <tburnus@baylibre.com>