From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by sourceware.org (Postfix) with ESMTPS id 4B51D3858CDB; Fri, 3 Mar 2023 21:18:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4B51D3858CDB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1677878270; i=anlauf@gmx.de; bh=fU16Xg6MWsYAxZ9yuDG43uBId7wdtCHpYcO542bN0xs=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=giJDaKa2xoYe2sQE4D/XEd7H8Zbe3VsOZZtBJh72oE93deQS2z2ylhOjKmL1LSdU+ GeEUr2Rb5P8ujLhe3qzKQ7v80xBCs//zAA7L6JUlSvPNpjM6AVm+s/kOS05S4671+a tqXYJ7imtYSMemFX/fCPt3useYU/URGdhUcUihaIHSUmki7iNDvKSTBbI9mM8yqXrp 0PV7wO4cGfj0VlJnRPxC8sWGqXz3Hy0zUbt53FHJ/i8dGIHYplm3v8lZ4TeBCno6A5 zFTehyAAl+uVXalAefvZc1RPP8CTJ7LC9ipVnbwFYQ8UcTyiy/e8w/IXeNg/Skskn5 UrNrr8m4fGTXw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.178.29] ([93.207.82.9]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M3lYB-1pXvXK41PH-000xGq; Fri, 03 Mar 2023 22:17:50 +0100 Message-ID: <7c36addc-00ae-7d75-694b-e47098485e61@gmx.de> Date: Fri, 3 Mar 2023 22:17:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH] Fortran: fix CLASS attribute handling [PR106856] To: sgk@troutmask.apl.washington.edu, Harald Anlauf via Fortran Cc: gcc-patches , tobias@codesourcery.com Newsgroups: gmane.comp.gcc.patches,gmane.comp.gcc.fortran References: Content-Language: en-US From: Harald Anlauf In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:LUvqaqUXS1Nv3Zj3aTHfouzluKH2L313VXSF/GnfUugO6rY2bDX BlEtnDBvuyWnnpSfmv/DI91Jae/8//7abtqR0i8P0PpCHaqrek6lIv8qD56TLwCTZqFV+An Bopu8sAyTformPXEzN19ur7yoI8ARbDYImNLMZPuX96Q0xv73hOtDsAmhI1MwGCwyRT3Rdi Szokt33KdfwsZs4kh1NnQ== UI-OutboundReport: notjunk:1;M01:P0:Q6YjTiyXGng=;SA+474aFM+2MftzF8kisKA5TLWB K4sdch6oqTZ7dKr6dChvcmLnnO/UrqEa8EI9AtYgy6blkx5MUxDFsQ0mqCvVJP/JTBKpYISC9 tuN4srX2LCBrzW8n8ufFxnQ9siZljHLer7D33qV/m1zin5IL27O0PNy2U9tVJrXRYmx777wBi Zc3d1Q1+2NqY12dm3SESskw5ox1UhPmtjLCYPhqpD9UKpYtVc88EVc4ib1NPOFW8abM0eR17e +7Qs9VmReO+BSkjTkRQlvgpKiox2Qx5IdXR+sz+Wae+oIMDIk8SSNit6iSKZVqUZVdoN8yceK iMymAbh9cgeXNMFXhP9zrLagP4q3WAv9c3Rn1ElNJpTEeVOqx7SED+grGcAIYYu6fnOxbzWz6 H7kNtyoBS+i4CJEt6T2jvM9TLgXOP9KlUIEQyU5dUEON/5jHMcHRYhrrYQUndL+WAzATaO6Yc KkC8nwypnGPk+DwlxDU4OTUkyWZKN9HbASUW7flBbRZYyQyYgsmpVUu0i2u26qOuH+YDWYqFj TZbrpJ8KRDS4UStLM/6tfzt6xn8zdOpQJpZV1wVME3YnYXUD67YmkU51J3P9ay018y6K/5PKV m3hS4Oo3XgkS3sV/jwSGnb+iPbR2dyP4lfo20FgNyi9AosYnMxeriNwMN+RsRc2FtlZagNYJi 3LsWfX2X5VttRv1D0wiM/YgrZcZ46Ugcoz1SSEx30rRie9012V8cvHd8Ixq2eLT5ZvtoL15K/ /FRrQJ5WAEw/hKx5ROQSto+t2uYnHyuVjB6OWoovR9cOOJJeTs5na0ndV5934dS//9oW5kfug rNCuE1BF3i5WDVvcNNWgnwlU3V0Lhz7DNMOHOk24AZ6zkYYXbHlT2yvmHnxR5dwceYhPgMhtt dquSir8b56OS3tLaEMgFl/08/T27O9ZKJmDZFHNPxYMdFuiMUqJnQnX925F6UIA8tn8MfmQA1 tQXwJWBcGgpsyK16b5CD3gdlBIw= X-Spam-Status: No, score=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,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: Message-ID: <20230303211747.yo8miP0aqaey5dDGIKrkVXAmgT9o__T8SJFCYlGFp5k@z> Hi Steve, Am 03.03.23 um 20:57 schrieb Steve Kargl via Gcc-patches: > On Thu, Mar 02, 2023 at 11:03:48PM +0100, Harald Anlauf via Fortran wrot= e: >> - if (attr->class_ok) >> - /* Class container has already been built. */ >> + /* Class container has already been built with same name. */ >> + if (attr->class_ok >> + && ts->u.derived->components->attr.dimension >=3D attr->dimensio= n >> + && ts->u.derived->components->attr.codimension >=3D attr->codime= nsion >> + && ts->u.derived->components->attr.class_pointer >=3D attr->poin= ter >> + && ts->u.derived->components->attr.allocatable >=3D attr->alloca= table) > > I suppose I'm a bit confused here. dimension, codimension, > pointer and allocatable are 1-bit bitfields in the attr > struct. These can have the values 0 and 1, so the above > conditionals are always true. thanks for looking into it. The above part is from the original draft. I thought I could generate testcases that allow to exercise this part, and found a new case that is not covered by the patch and still ICEs: subroutine bar (x) class(*) :: x dimension :: x(:) allocatable :: x end :-( We'll need to revisit the logic... > The rest of the patch looks reasonable. If Tobias has no > objections or comments, it's ok to commit once the above > is explained. > Thanks, Harald