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

--- Comment #43 from anlauf at gcc dot gnu.org ---
(In reply to anlauf from comment #42)
> The following patch does the magic (not regtested):
> 
> diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
> index 8daa7bb8d06..0a995ec3ae7 100644
> --- a/gcc/fortran/expr.c
> +++ b/gcc/fortran/expr.c
> @@ -3087,6 +3087,9 @@ gfc_reduce_init_expr (gfc_expr *expr)
>      t = gfc_check_init_expr (expr);
>    gfc_init_expr_flag = false;
>  
> +  if (gfc_error_check())
> +    return false;
> +
>    if (!t || !expr)
>      return false;

This produces lots of regressions.  So this is apparently not the right place.

Reply via email to