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

--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to Jerry DeLisle from comment #1)
> The check is easy enough to delete:
> 
> diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
> index c5bf822cd24..a8e6dd389b0 100644
> --- a/gcc/fortran/expr.c
> +++ b/gcc/fortran/expr.c
> @@ -3073,19 +3073,6 @@ check_restricted (gfc_expr *e)
>        sym = e->symtree->n.sym;
>        t = false;
>  
> -      /* If a dummy argument appears in a context that is valid for a
> -        restricted expression in an elemental procedure, it will have
> -        already been simplified away once we get here.  Therefore we
> -        don't need to jump through hoops to distinguish valid from
> -        invalid cases.  */
> -      if (sym->attr.dummy && sym->ns == gfc_current_ns
> -         && sym->ns->proc_name && sym->ns->proc_name->attr.elemental)
> -       {
> -         gfc_error ("Dummy argument %qs not allowed in expression at %L",
> -                    sym->name, &e->where);
> -         break;
> -       }
> -
>        if (sym->attr.optional)
>         {
>           gfc_error ("Dummy argument %qs at %L cannot be OPTIONAL",

What happens with -std=f95 and -std=f2003?

-- 
steve

Reply via email to