https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66311
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rsandifo at gcc dot gnu.org --- Comment #12 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- Created attachment 36128 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36128&action=edit Alternative patch 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.