From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cc-smtpout3.netcologne.de (cc-smtpout3.netcologne.de [IPv6:2001:4dd0:100:1062:25:2:0:3]) by sourceware.org (Postfix) with ESMTPS id 03DD1382FAF7; Thu, 24 Nov 2022 18:58:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 03DD1382FAF7 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=netcologne.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=netcologne.de Received: from cc-smtpin1.netcologne.de (cc-smtpin1.netcologne.de [89.1.8.201]) by cc-smtpout3.netcologne.de (Postfix) with ESMTP id 4A10D12156; Thu, 24 Nov 2022 19:58:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=netcologne.de; s=nc1116a; t=1669316323; bh=5+4XQUOvzg0mah+Oun7KWOraecAKXyp99f9MpdUaI0M=; h=Message-ID:Date:Subject:To:References:From:In-Reply-To:From; b=HVYMz0xtOIfCy+QHEDQn5Hn+3j7q5IVjzstW2E4e0EnwGSpkagn0awzdBILHHjG7j 3XcQnuXbPLmePAbh9U71rVLdZkYjGIYwaUytXETPvktCw9ko/r4YCh1nnDFql0cDoi gJS8s5H4XeyGxMNr6uXz6jSgFYo+uWGwJIeVW+gMPUS1mvmX6JYffEVX2mnsCgErmp rOavU0sIFZMYUBVc8B1q3/jcLefN4SFTgy2rTel+vFKpP+Y6XQJndRHCr9Fvlf3T99 m9N/BIg392xcNwEDD4agoA9rNlMrQevfzKrpOdKvvCeBctCEcLJjOoFap3BMD5b++H 4O1vbD21Q8y0g== Received: from [IPV6:2a0a:a540:1208:0:7285:c2ff:fe6c:992d] (2a0a-a540-1208-0-7285-c2ff-fe6c-992d.ipv6dyn.netcologne.de [IPv6:2a0a:a540:1208:0:7285:c2ff:fe6c:992d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by cc-smtpin1.netcologne.de (Postfix) with ESMTPSA id B069711D79; Thu, 24 Nov 2022 19:58:39 +0100 (CET) Message-ID: Date: Thu, 24 Nov 2022 19:58:39 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] Fortran: error recovery on associate with bad selector [PR107577] Content-Language: en-US To: Harald Anlauf , fortran , gcc-patches , kargl@gcc.gnu.org References: From: Thomas Koenig In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-NetCologne-Spam: L X-Spamd-Bar: - X-Rspamd-Queue-Id: B069711D79 X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Harald, > please find attached an obvious patch by Steve for a technical > regression that resulted from improvements in error recovery > of bad uses of associate. > > Regtested on x86_64-pc-linux-gnu. > > Will commit soon unless there are comments. Obvious enough, I think. Thanks! > As a sidenote: the testcase shows that we resolve the associate > names quite often, likely more often than necessary, resulting > in many error messages produced for the same line of code. In > the present case, each use of the bad name produces two errors, > one where it is used, and one at the associate statement. > That is probably not helpful for the user. We have an "error" flag in gfc_expr, which we use infrequently to avoid repetitions of errors. If an error has already been issued for an expression, then we could set this. We would have to be careful about resetting the error on matching though, so it is probably better to only use it during resolution. Best regards Thomas