https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82065
--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jerry DeLisle <[email protected]>: https://gcc.gnu.org/g:322362ce514228d5f9fcd3a06444b01425d665e6 commit r17-3679-g322362ce514228d5f9fcd3a06444b01425d665e6 Author: Jerry DeLisle <[email protected]> Date: Sun Aug 16 11:57:30 2026 -0700 fortran: [PR82065] ISO_FORTRAN_ENV array constants used in a procedure Array-valued named constants from ISO_FORTRAN_ENV are forced TREE_STATIC so they can be inlined, but the static initializer was only emitted when the symbol's namespace belonged to the main program or a module. Used inside any procedure the array was emitted uninitialized, yielding zeros. Assisted-by: Claude Opus 5 PR fortran/82065 gcc/fortran/ChangeLog: * trans-decl.cc (gfc_get_symbol_decl): Emit the static initializer for intrinsic array parameters regardless of the enclosing namespace. gcc/testsuite/ChangeLog: * gfortran.dg/iso_fortran_env_10.f90: New test.
