https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120483
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Andre Vehreschild <ve...@gcc.gnu.org>: https://gcc.gnu.org/g:afa2de8093a0cd47394df42c7092aa6a357d2f9c commit r16-1096-gafa2de8093a0cd47394df42c7092aa6a357d2f9c 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.