https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88685
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P4 Status|UNCONFIRMED |NEW Last reconfirmed| |2019-01-04 CC| |kargl at gcc dot gnu.org Known to work| |7.4.1 Ever confirmed|0 |1 Known to fail| |8.2.1, 9.0 --- Comment #1 from kargl at gcc dot gnu.org --- Interesting bug. Changing doit() to subroutine doit(cls) class(tarr), pointer :: cls(:,:) cls(1,1)%cl = 1 print *, 'cl = ', cls(1,1)%cl print *, 'cl(i)= ', cls(1,1)%cl(1:3) print *, 'cl(i)= ', cls(1,1)%cl(1:1),cls(1,1)%cl(2:2),cls(1,1)%cl(3:3) print *, 'cl(i)= ', cls(1,1)%cl(1),cls(1,1)%cl(2),cls(1,1)%cl(3) end subroutine doit shows that the issue involves the reference individual elements. With gfortran 7.4.1, get % gfc7 -o z a.f90 && ./z cl = 1 1 1 cl(i)= 1 1 1 cl(i)= 1 1 1 cl(i)= 1 1 1 with 8.2.1 and 9.0 I get % gfc8 -o z a.f90 && ./z cl = 1 1 1 cl(i)= 1 1 1 cl(i)= 1 1 1 cl(i)= 1 -1 -1