From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from msa.smtpout.orange.fr (smtp-68.smtpout.orange.fr [80.12.242.68]) by sourceware.org (Postfix) with ESMTPS id F281B3858C41; Fri, 15 Mar 2024 16:31:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F281B3858C41 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=orange.fr Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=orange.fr ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F281B3858C41 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=80.12.242.68 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710520318; cv=none; b=PBQ3R9p48jzAUrKSzlpoCWTto933hp1Jlu13LtYfFGVT4se1iOq2j06YkHz5MPC/xuwPptLD/JpX5OLIHiH4/9A8w4WlmXP5YJcObIGyERpVJvplp33bKQkU1t9yJX/OdoW9U4XemrYAZpEmQN0fM1hiDsAx5oHaAF7YTUXBp+k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1710520318; c=relaxed/simple; bh=Ezm5gbvtIaY8NNdng8Ocd/lWI8vFhlB0wWF1+gqTe8A=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=lNeSqbeIQ1Alxv2SeyWkfg1Yxg5jbhE6gf6l1nDw5tBnmMXqNgABm7V8+Mw9MkWJlakpbxLkiHvQtD3igpTIrExt5EGAxPZk95kH7A6d9EllRB00Nz2XqmTZwhS9edg2GW/T3bwo5jtSQQOfOkYR5JoQHtwrfYBvy2TznseE3qY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from [192.168.1.19] ([86.215.161.51]) by smtp.orange.fr with ESMTPA id lATCr89OoMnOmlATJrdtoh; Fri, 15 Mar 2024 17:31:55 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1710520315; bh=YKt0RwKN4W2YP2kIsLMr8CePjYfhaoe1pQzGtfTQW+8=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=irOwKa8n4dqU7uRV/rJ8BBt3Lxau8xP3xHokIMFL42IW1MvMcGb1XT9yr+015UVYu rVk84N2oIBZwgq5Vnu12IiYzMP6RWdjJOv9RN/jK7HfWDpshZZ7tATiIPaT/sk2vb+ KXNNk9Q6G+gAf5hiKI2ZvV0uspzN5JJjWbXBrC+WWX7ZjZZZ/iT3d8PaRhFm/qmynZ vSIK6kmb3LKdUd98MylMIZLbXFJR0x1zlRbrpHbOv+BR6Y+zg0KJtraBlydqrWjxlk /pcflmZV42+pHeVi8IhaaRJ9+beh/RMD0lT86E+KCA1o1M+/LnSPj47BWN9pZT+yuv Z/jrziTq8K/2w== X-ME-Helo: [192.168.1.19] X-ME-Auth: bW9yaW4tbWlrYWVsQG9yYW5nZS5mcg== X-ME-Date: Fri, 15 Mar 2024 17:31:55 +0100 X-ME-IP: 86.215.161.51 Message-ID: <6d15efdc-cc99-4008-b0e7-9091a9cebced@orange.fr> Date: Fri, 15 Mar 2024 17:31:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH, v2] Fortran: use name of array component in runtime error message [PR30802] To: Harald Anlauf , sgk@troutmask.apl.washington.edu Cc: fortran , gcc-patches References: <67c77b44-79cb-4029-b59a-c92dfad15fa9@orange.fr> <86888cc5-3650-4044-b67d-89aab1631753@gmx.de> <70fc4304-74b4-4d8c-8172-9c3286bc9ada@gmx.de> <50f2a7c0-55af-4079-9f6f-41dc6497c234@orange.fr> <04f84bdb-4589-444a-93af-9e252908da93@orange.fr> Content-Language: en-US From: Mikael Morin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: Le 10/03/2024 à 22:31, Harald Anlauf a écrit : > Dear all, > > after playing for some time with NAG and Intel, and an off-list > discussion with Jerry, I am getting more and more convinced that > simpler runtime error messages (also simpler to parse by a human) > are superior to awkward solutions.  This is also what Intel does: > use only the name of the array (component) in the message whose > indices are out of bounds. > > (NAG's solution appears also inconsistent for nested derived types.) > > So no x%z, or x%_data, etc. in runtime error messages any more. > That's a pity. What about providing the root variable and the failing component only? ... dimension 1 of array component 'z...%x' above array bound ... The data reference doesn't look great, but it provides valuable (in my opinion) information. > Please give it a spin... > > Regtested on x86_64-pc-linux-gnu.  OK for mainline? > > Thanks, > Harald > > > On 1/30/24 11:46, Mikael Morin wrote: >> Le 30/01/2024 à 11:38, Mikael Morin a écrit : >>> >>> Another (easier) way to clarify the data reference would be rephrasing >>> the message so that the array part is separate from the scalar part, >>> like so (there are too many 'of', but I lack inspiration): >>> Index '0' of dimension 1 of component 'zz' of element from 'x1%vv' >>> below lower bound of 1 >>> >> This has the same number of 'of' but sounds better maybe: >> Out of bounds accessing component 'zz' of element from 'x1%yy': index >> '0' of dimension 1 below lower bound of 1 >>