fortran: array descriptor: Move array growth function [PR122521]
Fortran array constructor growth function moved to improve organization.
The gfc_grow_array function, responsible for growing array descriptors during array constructor initialization in the Fortran front-end, has been relocated. It was moved from trans-array.cc to trans-descriptor.cc to consolidate descriptor-related logic, with its declaration updated in trans-descriptor.h. This change is part of addressing PR122521.
In Details
Within the GCC Fortran front-end, the gfc_grow_array function, previously residing in trans-array.cc, has been moved to trans-descriptor.cc. This function is part of the infrastructure for constructing and initializing Fortran arrays, particularly in array constructors. The move consolidates array descriptor manipulation logic into a single file, improving code organization and maintainability. This change is linked to PR122521.
- array descriptor
- A data structure used by compiled Fortran code to represent an array. It typically holds information such as the array's base address, bounds, element size, and stride.
- array constructor
- A Fortran language construct that allows an array to be initialized with a list of values. For example:
my_array = [/ 1, 2, 3 /]. - trans-array.cc
- A source file within the GCC Fortran front-end that likely contains code related to the translation and manipulation of arrays.
- trans-descriptor.cc
- A source file within the GCC Fortran front-end that likely contains code related to the translation and manipulation of data descriptors, including array descriptors.
- PR122521
- Problem Report number 122521. This indicates a bug or issue that has been reported and is being addressed by this commit.