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

Fortran: Fix ICE in pdt_bug9/10.f90 by reordering operations.

Fortran compiler fixes a regression by reordering deallocation steps.

This commit addresses an ICE (Internal Compiler Error) in the Fortran compiler that occurred after a previous change. The issue was traced to the order of deallocation operations for PDT components within the gfc_trans_allocate function. By moving the gfc_replace_expr call to occur after the deallocation, the compiler now handles these operations correctly, resolving the regression.

In Details

This commit modifies gcc/fortran/trans-stmt.cc to reorder operations within gfc_trans_allocate. Specifically, gfc_replace_expr is moved after the deallocation of PDT (Procedure Description Table) components. This addresses a regression PR128093 by correcting the sequence of memory management operations for dynamic data structures within the Fortran front-end's intermediate representation transformation phase.

Filed Under: fortrancompiler error