https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71883
--- Comment #7 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
@Paul: Here is a suggestion.
Feel free to use / modify / whatever this, I will not be
able to submit a patch for the next two weeks or so.
Index: frontend-passes.c
===================================================================
--- frontend-passes.c (Revision 238638)
+++ frontend-passes.c (Arbeitskopie)
@@ -119,6 +119,7 @@
gfc_run_passes (gfc_namespace *ns)
{
+ int w, e;
/* Warn about dubious DO loops where the index might
change. */
@@ -136,6 +137,10 @@
expr_array.release ();
}
+ gfc_get_errors (&w, &e);
+ if (e >=0)
+ return;
+
if (flag_realloc_lhs)
realloc_strings (ns);
}