GCC Newspaper
OCTOBER 6, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
fortran

Fortran: Coarray descriptor copy function moved

Fortran coarray descriptor copy function moved to a public header for broader access.

The copy_coarray_desc_part function, used for copying parts of coarray descriptors, has been moved from trans-expr.cc to trans-descriptor.cc and is now declared in trans-descriptor.h. This makes the function visible externally and prepares it for further refactoring, addressing PR122521.

In Details

The Fortran front-end moves the copy_coarray_desc_part function to trans-descriptor.cc and declares it in trans-descriptor.h. This facilitates its use in gfc_class_array_data_assign and gfc_conv_derived_to_class, which will be modified in subsequent patches to use this refactored functionality, addressing a code organization issue related to PR122521.

For Context
coarray
A Fortran language feature that allows for parallel programming by providing a way to access data on remote processors directly.
array descriptor
A data structure used in Fortran to represent an array, containing information about its base address, dimensions, strides, and other properties.
trans-expr.cc
A GCC source file containing code for translating Fortran expressions into intermediate representation.
trans-descriptor.cc
A GCC source file containing code related to the manipulation and creation of Fortran array descriptors.
trans-descriptor.h
The header file declaring functions and data structures related to Fortran array descriptors.
Filed Under: fortranrefactorcompiler