From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ciao.gmane.io (ciao.gmane.io [116.202.254.214]) by sourceware.org (Postfix) with ESMTPS id 185FD384FB44 for ; Tue, 21 Feb 2023 18:11:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 185FD384FB44 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=m.gmane-mx.org Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1pUX79-0004TF-3q for gcc-patches@gcc.gnu.org; Tue, 21 Feb 2023 19:11:43 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gcc-patches@gcc.gnu.org From: Harald Anlauf Subject: Re: [PATCH] Fortran: improve checking of character length specification [PR96025] Date: Tue, 21 Feb 2023 19:11:38 +0100 Message-ID: References: <1b3cbb1c-8994-09d0-7681-d997e9700302@netcologne.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Content-Language: en-US In-Reply-To: <1b3cbb1c-8994-09d0-7681-d997e9700302@netcologne.de> Cc: fortran@gcc.gnu.org X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,BODY_8BITS,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Message-ID: <20230221181138.3cBXzdugzBvfQ4-OK-sH0Cje0rk_VpNUiBKLeE46aps@z> Hi Thomas, Am 21.02.23 um 08:19 schrieb Thomas Koenig via Gcc-patches: > Hi Harald, > >> the attached patch fixes an ICE on invalid (non-integer) >> specification expressions for character length in function >> declarations.  It appears that the error handling was >> already in place (mostly) and we need to essentially >> prevent run-on errors. >> >> Regtested on x86_64-pc-linux-gnu.  OK for mainline? > As a very minor matter of style, you might want to write > >           function_result_typed = check_function_result_typed (); > > instead of > >       if (check_function_result_typed ()) >         function_result_typed = true; I was considering that too, but believed that the logic around these places (a loop and an if) would confuse readers. Thinking again and rechecking, I've changed the patch to follow your suggestion, including a minor style cleanup. Committed as: https://gcc.gnu.org/g:6c1b825b3d6499dfeacf7c79dcf4b56a393ac204 commit r13-6265-g6c1b825b3d6499dfeacf7c79dcf4b56a393ac204 Author: Harald Anlauf Date: Mon Feb 20 21:28:09 2023 +0100 > OK either way. > >> The PR is marked as a 10/11/12/13 regression, so I would >> like to backport this as far as it seems reasonable. > > Also OK. > > Thanks for the patch! Thanks for the review! Harald > Best regards > >     Thomas >