http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50540
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #1 from kargl at gcc dot gnu.org 2011-10-17 00:58:33 UTC --- The internal error can be removed by changing the error report. This patch downgrades the error from an internal error to a standard error. Index: resolve.c =================================================================== --- resolve.c (revision 180062) +++ resolve.c (working copy) @@ -6415,14 +6415,14 @@ resolve_forall_iterators (gfc_forall_ite gfc_error ("FORALL start expression at %L must be a scalar INTEGER", &iter->start->where); if (iter->var->ts.kind != iter->start->ts.kind) - gfc_convert_type (iter->start, &iter->var->ts, 2); + gfc_convert_type (iter->start, &iter->var->ts, 1); if (gfc_resolve_expr (iter->end) == SUCCESS && (iter->end->ts.type != BT_INTEGER || iter->end->rank != 0)) gfc_error ("FORALL end expression at %L must be a scalar INTEGER", &iter->end->where); if (iter->var->ts.kind != iter->end->ts.kind) - gfc_convert_type (iter->end, &iter->var->ts, 2); + gfc_convert_type (iter->end, &iter->var->ts, 1); if (gfc_resolve_expr (iter->stride) == SUCCESS) { @@ -6436,7 +6436,7 @@ resolve_forall_iterators (gfc_forall_ite &iter->stride->where); } if (iter->var->ts.kind != iter->stride->ts.kind) - gfc_convert_type (iter->stride, &iter->var->ts, 2); + gfc_convert_type (iter->stride, &iter->var->ts, 1); } for (iter = it; iter; iter = iter->next) The error message is then laptop:kargl[251] gfc4x -c foo.f90 foo.f90:3.20: forall (i=2:ix) dest(i)=i 1 Error: Symbol 'ix' at (1) has no IMPLICIT type foo.f90:3.18: forall (i=2:ix) dest(i)=i 1 Error: Can't convert UNKNOWN to INTEGER(4) at (1) which I think is acceptable because when one fixes the first error implicit typing of ix, then the 2nd message goes away.