]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
fortran: Tiny sort_actual internal refactoring
authorMikael Morin <mikael@gcc.gnu.org>
Sun, 7 Nov 2021 13:39:47 +0000 (14:39 +0100)
committerMikael Morin <mikael@gcc.gnu.org>
Tue, 16 Nov 2021 18:07:50 +0000 (19:07 +0100)
Preliminary refactoring to make further changes more obvious.
No functional change.

gcc/fortran/ChangeLog:
* intrinsic.c (sort_actual): initialise variable and use it earlier.

gcc/fortran/intrinsic.c

index 2d7d2461fd0f6cb94fcec762de92f95ca387895c..33b827673e7f8cef651989cb6fdbdeb5e6c04f83 100644 (file)
@@ -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;