https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57096
--- Comment #14 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- The reduced test case with gfortran 7.2.1 O get: $ ./test 1 1 0 1 and the original: $ ./test gA%next(): 0 gA%next(): 0 gA%next(): 0 gAp%next(): 2 gAp%next(): 4 gAp%next(): 6 and with latest trunk: $ ./test gA%next(): 0 gA%next(): 0 gA%next(): 0 gAp%next(): 2 gAp%next(): 4 gAp%next(): 6 hmm, now something is not right.