https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71883

--- Comment #9 from kargl at gcc dot gnu.org ---
(In reply to Thomas Koenig from comment #7)
> @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)

e == 0 means no errors have occurred.  You probably want
"if (e > 0)"

Reply via email to