GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
fortran

Fortran parameterized derived types gain error detection

Fortran compiler improves error handling for parameterized derived types, fixing bugs and adding tests.

Several commits address issues with Fortran’s parameterized derived types (PDTs). Changes in match.cc and decl.cc improve the compiler’s ability to detect deferrable components and handle NULL rvalues in pointer assignments. New test cases verify these fixes, ensuring more robust handling of PDTs.

In Details

These commits refine the Fortran frontend's handling of Parameterized Derived Types (PDTs). The changes in match.cc and decl.cc aim to correctly identify deferrable components in derived type declarations and manage pointer assignments involving NULL values. This work is crucial for accurate type checking and instantiation of complex derived types in Fortran.

For Context
Parameterized Derived Type (PDT)
A derived type in Fortran whose structure depends on type parameters, similar to templates in C++ but with type parameters determined at instantiation time.
Deferrable Component
A component within a derived type that has its shape or type parameters determined at runtime rather than compile time. For allocatable arrays, this means their size is not fixed until allocation.
rvalue
In programming, an rvalue is an expression that represents a value which can be assigned to an lvalue. In Fortran, this typically refers to the result of an expression or function call.
Filed Under: fortrancompiler bugs