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

Fortran array descriptors: Move initialization for absent assumed-shape arguments

Fortran compiler consolidates initialization code for absent assumed-shape array descriptors.

The Fortran compiler has moved the code that initializes array descriptors for absent assumed-shape arguments into a new, dedicated function. This ensures the data pointer field is correctly set to null, representing the argument’s absence.

In Details

A new function, gfc_init_absent_descriptor in trans-descriptor.cc, is created to centralize the initialization of array descriptors for absent assumed-shape arguments. This logic was previously in gfc_conv_derived_to_class and sets the data pointer to null.

For Context
array descriptor
A data structure used by the Fortran compiler to represent arrays, holding information such as data pointer, type, rank, and bounds.
assumed-shape argument
In Fortran, a procedure argument whose upper and lower bounds are not specified in the procedure definition but are assumed to match the passed actual argument.
absent argument
An optional Fortran procedure argument that was not provided by the caller.
trans-descriptor.cc
A GCC source file containing functions for creating and manipulating array descriptors during the intermediate representation (IR) translation phase.
Filed Under: fortrancompilerrefactoring