https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120483
--- Comment #10 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Andre Vehreschild <ve...@gcc.gnu.org>: https://gcc.gnu.org/g:1549bb90c10c5e3ef1c5f2080cdb58dbaee25291 commit r15-9831-g1549bb90c10c5e3ef1c5f2080cdb58dbaee25291 Author: Andre Vehreschild <ve...@gcc.gnu.org> Date: Mon Jun 2 10:41:48 2025 +0200 Fortran: Fix missing substring ref for allocatable saved vars [PR120483] Compute a substring ref on an allocatable static character array using pointer arithmetic. Using an array type corrupts type layouting and crashes omp generation. PR fortran/120483 gcc/fortran/ChangeLog: * trans-expr.cc (gfc_conv_substring): Use pointer arithmetic on static allocatable char arrays. gcc/testsuite/ChangeLog: * gfortran.dg/save_8.f90: New test. (cherry picked from commit 5c9bdfd2748b8159856a37404ab7b34d977242ce)