From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp09.smtpout.orange.fr [80.12.242.131]) by sourceware.org (Postfix) with ESMTPS id 16C6C3858406 for ; Sun, 7 Nov 2021 16:16:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 16C6C3858406 Received: from cyrano.home ([92.167.144.168]) by smtp.orange.fr with ESMTPA id jkqTmFEb9E8xTjkqYm8cqy; Sun, 07 Nov 2021 17:16:43 +0100 X-ME-Helo: cyrano.home X-ME-Auth: MDU4MTIxYWM4YWI0ZGE4ZTUwZWZmNTExZmI2ZWZlMThkM2ZhYiE5OWRkOGM= X-ME-Date: Sun, 07 Nov 2021 17:16:43 +0100 X-ME-IP: 92.167.144.168 From: Mikael Morin To: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH v3 1/5] fortran: Tiny sort_actual internal refactoring Date: Sun, 7 Nov 2021 17:16:32 +0100 Message-Id: <20211107161636.1167116-2-mikael@gcc.gnu.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211107161636.1167116-1-mikael@gcc.gnu.org> References: <20211107161636.1167116-1-mikael@gcc.gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.33.0" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_40, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Nov 2021 16:16:45 -0000 This is a multi-part message in MIME format. --------------2.33.0 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit 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 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --------------2.33.0 Content-Type: text/x-patch; name="0001-fortran-Tiny-sort_actual-internal-refactoring.patch" Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="0001-fortran-Tiny-sort_actual-internal-refactoring.patch" diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index a6a18a471e3..49ef3b2a3d2 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -4378,19 +4378,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; --------------2.33.0--