https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91568
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- So the fixing rev. makes us not sink stmts into a loop (in this case the invariant division 1./z) so the issue is probably latent. Reduced testcase w/o undefined behavior: subroutine h3dall(z,hvec,hder,nterms) complex *16 hvec(0:1),hder(0:1) complex *16 z,zinv,ztmp/1.0/ zinv=1.0/z do i=1,nterms ztmp=zinv*i hder(i)=hvec(i-1)-ztmp*hvec(i) enddo end