https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66311
--- Comment #13 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> --- (In reply to rsand...@gcc.gnu.org from comment #12) > Here's an alternative patch. I haven't yet tested it beyond > an expanded version of the testcase, but I think it's easier > to follow if we separate the "val != valres" and "need an extra > zero block" logic. I can confirm that the attached patch fixes all Fortran testcases reported in this thread.