https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107968
anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2022-12-05 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW CC| |anlauf at gcc dot gnu.org --- Comment #1 from anlauf at gcc dot gnu.org --- Confirmed. A look at the tree dump shows a funny expansion of the array section in the data transfer (write statement). It appears that some optimization of the transfer of arrays is attempted, but the stride looks wrong. Replacing WRITE (0,*) vertices_pointer%vlon(1:) by any of the following produces different - working - output: WRITE (0,*) [vertices_pointer%vlon(1:)] WRITE (0,*) (vertices_pointer%vlon(1:)) WRITE (0,*) (vertices_pointer%vlon(i),i=1,size(vertices_pointer%vlon)) And - as reported - why should the addition of a (dead) pointer assignment after the write change the way the array section is expanded? Looking at older gfortran version, all tested seem to fail. And with the dead pointer assignment uncommented, gfortran-7 ICEs.