Hello, this is a followup to a patch (see the thread at [1]) committed for the gcc-12 release to use pointer arithmetic to index descriptor arrays. This patch restores the previous behavior (array indexing for all non-polymorphic arrays), and for that changes the array element that descriptors’ data pointers point to, to meet the middle-end expectations, that is array indexing never use negative indexes. So descriptors’ data pointers are made to point to the first element in memory order instead of the first element in descriptor indexing order (they can be different with negative strides). This is not a formal request for review yet, I would like to have a confirmation that some benefits make this patch worth pursuing further (and breaking the ABI). Especially, Richi reported in the thread [1] a regression with Spec 2017; if he (or someone else with access to spec) would be kind enough to try again with this patch, it would be appreciated. There are also a number of loop versioning tests which I have xfailed for now, without a better idea of what’s going on. With a couple more testsuite adjustments (included in the patch), these changes pass the fortran regression testsuite. I attach a patch with generated library code and one without. No ChangeLog for now, a gross outline of the changes follows. Feel free to comment, do we need this? Thanks for your time. gcc/fortran/ - revert [1] - change the way data pointer and offset are constructed in new descriptors - adjust data pointer when passing to a CFI descriptor and back - reconstruct data pointer and offset when reconstructing a descriptor from CFI descriptor gcc/testsuite/gfortran.dg/ - adjust original tree dump patterns - xfail loop versioning tests libgfortran/ - rebuild a pointer to the first element from the descriptor at the beginning of library functions - adjust io array walking code. [1] https://gcc.gnu.org/pipermail/fortran/2022-April/057763.html