https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71404
--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- Further reduced test SUBROUTINE SQRINT (LFILE,IREGION,LENGTH) DIMENSION IREGION(LENGTH) LOGICAL DSKWRK,MASWRK IF (DSKWRK.OR.MASWRK) READ(LFILE, END=200) IREGION 200 CONTINUE END The ICE disappears if I remove the 'IF (DSKWRK.OR.MASWRK)' or the ', END=200'.