From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.smtpout.orange.fr (smtp04.smtpout.orange.fr [80.12.242.126]) by sourceware.org (Postfix) with ESMTPS id 6DC153980C39 for ; Thu, 5 Aug 2021 16:26:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6DC153980C39 Received: from cyrano.home ([92.167.144.168]) by mwinf5d08 with ME id dsSE2500R3eCq5G03sSLYo; Thu, 05 Aug 2021 18:26:20 +0200 X-ME-Helo: cyrano.home X-ME-Auth: bW9yaW4tbWlrYWVsQG9yYW5nZS5mcg== X-ME-Date: Thu, 05 Aug 2021 18:26:20 +0200 X-ME-IP: 92.167.144.168 From: Mikael Morin To: fortran@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org, Mikael Morin Subject: [PATCH v2 2/7] fortran: Tiny sort_actual internal refactoring Date: Thu, 5 Aug 2021 18:26:09 +0200 Message-Id: <20210805162614.647806-3-mikael@gcc.gnu.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210805162614.647806-1-mikael@gcc.gnu.org> References: <20210805162614.647806-1-mikael@gcc.gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------2.30.2" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, 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: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Aug 2021 16:26:23 -0000 This is a multi-part message in MIME format. --------------2.30.2 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/ * intrinsic.c (sort_actual): initialise variable and use it earlier. --- gcc/fortran/intrinsic.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --------------2.30.2 Content-Type: text/x-patch; name="0002-fortran-Tiny-sort_actual-internal-refactoring.patch" Content-Transfer-Encoding: 8bit Content-Disposition: inline; filename="0002-fortran-Tiny-sort_actual-internal-refactoring.patch" diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index 219f04f2317..ffeaf2841b7 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -4411,19 +4411,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.30.2--