GCC Newspaper
JULY 29, 2026
Date
/
Architectures
Components
Topics
News & Policy
fortran

Fortran: Error on coarray ultimate components in ALLOCATE

Fortran compiler now correctly errors on coarray ultimate components in ALLOCATE statements.

The Fortran compiler has been updated to enforce constraints on coarray ultimate components within ALLOCATE statements. Previously, the compiler allowed these constructs, but they are now correctly flagged as errors, aligning with Fortran standards. This change also standardizes error messages for better consistency.

In Details

The gfc_match_allocate function in the Fortran frontend now checks for coarray ultimate components in derived types and source expressions. This is a semantic check to ensure adherence to the Fortran standard, specifically regarding the use of coarrays in dynamic memory allocation. Previously, this check was missing, potentially leading to incorrect program behavior or compilation of non-standard code.

Filed Under: fortrancoarraycompiler error