diff mbox series

PR fortran/90297 -- Remove code with no functional effect

Message ID 20191012001701.GA1007@troutmask.apl.washington.edu
State New
Headers show
Series PR fortran/90297 -- Remove code with no functional effect | expand

Commit Message

Steve Kargl Oct. 12, 2019, 12:17 a.m. UTC
The patch is fairly self-explanatory.  OK to commit?

2019-10-11  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/90297
	* resolve.c (resolve_typebound_function): Remove code with no
	functional effect.

Comments

Paul Richard Thomas Oct. 12, 2019, 1:40 p.m. UTC | #1
Hi Steve,

As I remarked on the PR thread, it is one of the less harmful bits of
code that I introduced :-)

OK to commit.

Thanks

Paul

On Sat, 12 Oct 2019 at 01:17, Steve Kargl
<sgk@troutmask.apl.washington.edu> wrote:
>
> The patch is fairly self-explanatory.  OK to commit?
>
> 2019-10-11  Steven G. Kargl  <kargl@gcc.gnu.org>
>
>         PR fortran/90297
>         * resolve.c (resolve_typebound_function): Remove code with no
>         functional effect.
>
> --
> Steve
diff mbox series

Patch

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c	(revision 276899)
+++ gcc/fortran/resolve.c	(working copy)
@@ -6548,21 +6548,6 @@  resolve_typebound_function (gfc_expr* e)
   overridable = !e->value.compcall.tbp->non_overridable;
   if (expr && expr->ts.type == BT_CLASS && e->value.compcall.name)
     {
-      /* If the base_object is not a variable, the corresponding actual
-	 argument expression must be stored in e->base_expression so
-	 that the corresponding tree temporary can be used as the base
-	 object in gfc_conv_procedure_call.  */
-      if (expr->expr_type != EXPR_VARIABLE)
-	{
-	  gfc_actual_arglist *args;
-
-	  for (args= e->value.function.actual; args; args = args->next)
-	    {
-	      if (expr == args->expr)
-		expr = args->expr;
-	    }
-	}
-
       /* Since the typebound operators are generic, we have to ensure
 	 that any delays in resolution are corrected and that the vtab
 	 is present.  */