GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
openmp

OpenMP: Fortran "!$omp declare mapper" parser support

Adds support for the OpenMP declare mapper directive in Fortran.

This commit introduces support for the !$omp declare mapper directive in the Fortran front end. This allows users to define custom data mappings for OpenMP data transfer operations, enabling more flexible and efficient parallel programming. The implementation includes necessary changes to the parser, internal data structures, and resolution routines, as well as new test cases.

In Details

This commit implements the Fortran-specific parsing and semantic analysis for the OpenMP declare mapper directive. It involves modifications to gfortran.h, match.cc, openmp.cc, and related files to support the syntax and semantics of user-defined mappers (UDMs). The implementation introduces new data structures (e.g., gfc_omp_namelist_udm) and functions (e.g., gfc_resolve_omp_udms) to handle UDMs within the Fortran front end.

For Context

OpenMP is an API for directive-based parallel programming, allowing developers to easily parallelize code regions. The declare mapper directive allows users to specify custom routines for mapping data between the host andOpenMP accelerators during data transfers, rather than relying on compiler defaults. This commit enables the use of this advanced feature within Fortran programs, providing more control over data movement in parallel applications.

Filed Under: openmpfortrandeclare mapperparallel programming