gnu /
gcc /
1549bb90c10c5e3ef1c5f2080cdb58dbaee25291 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)
2 files changed