https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71799
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> --- (In reply to kargl from comment #1) > Index: resolve.c > =================================================================== > --- resolve.c (revision 237855) > +++ resolve.c (working copy) > @@ -6515,15 +6515,15 @@ gfc_resolve_iterator (gfc_iterator *iter > /* Convert start, end, and step to the same type as var. */ > if (iter->start->ts.kind != iter->var->ts.kind > || iter->start->ts.type != iter->var->ts.type) > - gfc_convert_type (iter->start, &iter->var->ts, 2); > + gfc_convert_type (iter->start, &iter->var->ts, 1); > > if (iter->end->ts.kind != iter->var->ts.kind > || iter->end->ts.type != iter->var->ts.type) > - gfc_convert_type (iter->end, &iter->var->ts, 2); > + gfc_convert_type (iter->end, &iter->var->ts, 1); > > if (iter->step->ts.kind != iter->var->ts.kind > || iter->step->ts.type != iter->var->ts.type) > - gfc_convert_type (iter->step, &iter->var->ts, 2); > + gfc_convert_type (iter->step, &iter->var->ts, 1); > > if (iter->start->expr_type == EXPR_CONSTANT > && iter->end->expr_type == EXPR_CONSTANT Thank you for the patch, are you going to test it and send to ML? I can do it, if you want?