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

ICE passing NULL() to allocatable dummy argument fixed

Allows passing NULL() to allocatable dummy arguments, resolving a compiler crash.

This commit resolves an Integer Compiler Error (ICE) encountered when passing a NULL() actual argument to an allocatable dummy argument in Fortran. The change ensures that NULL() is handled correctly for non-class, non-character allocatable dummies, similar to how it’s handled for derived-type dummies. A new test case is added to confirm the fix.

In Details

The conv_null_actual function in fortran/trans-expr.cc has been updated to correctly handle passing a NULL() actual argument to non-class, non-character allocatable dummy arguments. This aligns its behavior with that for derived-type dummies, fixing an ICE related to PR125724.

Filed Under: fortrancompiler bug