public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5314] fortran: Tiny sort_actual internal refactoring
@ 2021-11-16 18:08 Mikael Morin
  0 siblings, 0 replies; only message in thread
From: Mikael Morin @ 2021-11-16 18:08 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c31733c3bf57d4cfc31e8d7a95b0ba2cd41e6ea3

commit r12-5314-gc31733c3bf57d4cfc31e8d7a95b0ba2cd41e6ea3
Author: Mikael Morin <mikael@gcc.gnu.org>
Date:   Sun Nov 7 14:39:47 2021 +0100

    fortran: Tiny sort_actual internal refactoring
    
    Preliminary refactoring to make further changes more obvious.
    No functional change.
    
    gcc/fortran/ChangeLog:
            * intrinsic.c (sort_actual): initialise variable and use it earlier.

Diff:
---
 gcc/fortran/intrinsic.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c
index 2d7d2461fd0..33b827673e7 100644
--- a/gcc/fortran/intrinsic.c
+++ b/gcc/fortran/intrinsic.c
@@ -4379,19 +4379,18 @@ do_sort:
 
   for (f = formal; f; f = f->next)
     {
-      if (f->actual && f->actual->label != NULL && f->ts.type)
+      a = f->actual;
+      if (a && a->label != NULL && f->ts.type)
 	{
 	  gfc_error ("ALTERNATE RETURN not permitted at %L", where);
 	  return false;
 	}
 
-      if (f->actual == NULL)
+      if (a == NULL)
 	{
 	  a = gfc_get_actual_arglist ();
 	  a->missing_arg_type = f->ts.type;
 	}
-      else
-	a = f->actual;
 
       if (actual == NULL)
 	*ap = a;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-16 18:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 18:08 [gcc r12-5314] fortran: Tiny sort_actual internal refactoring Mikael Morin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).