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

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at gcc dot gnu.org

--- Comment #1 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
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",

Reply via email to