From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id 62A43385702F; Fri, 30 Jun 2023 06:41:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 62A43385702F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-262e04a6f66so848117a91.0; Thu, 29 Jun 2023 23:41:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688107263; x=1690699263; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Zp7pOOa0zlszQFT+JEbjbCn3YL5QyJwPkejG6tbSQo8=; b=N0YgDZh6g06TxQ9rr/OBKUc0/iVKD7hehfxUAZOnCB6wffErKzkTyv7x+76Vx9F+WP udmBLD90dZp8tG32q3PyF6mAa7V8iWSqvua8OiGQ+Rg0DyyBFnfwKG3vkV2p+yGbhZyJ 2h0epXn1ZQO7kbglPWrgdeY7Nxd3WxCK2LRwiqlnmbrc0vq7ADVppSqDZnpsy1mqybwZ 2Ncal0x/c35JBm1h1Wv3oeN3Mrz/OJBLW8zTXHpA8KdDvKErIpU1TJEw8o3zICZAKw+t JakVL2c6Mhwd6UqcglInrhk220Qm/ola1i9NjWxm2YSBbo4oBwW/4HxhodiQ06Hz+H4Z A3Lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688107263; x=1690699263; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Zp7pOOa0zlszQFT+JEbjbCn3YL5QyJwPkejG6tbSQo8=; b=dCGAnWQuIxoyzr7QYwazXpaTmswbFvS5VAPDEuJyPKIQtA6Hp0O5SG3PURoeHrrW0Q iyLc+18lDCRkBeGq5ByYBdY1oWTGbM/lejzLZfTfdIOiSlHDrzURVGCcMSYbdqj/8cEw DCH5nXpdfZr1PaCsGF3iNN9VN328o1p6diT8DVUTp5ahFYa9jCjTUqbjyw4tDksc8xPa zTXRkhXcQye3YrJ5DX8BzufTnqs0//52h2EE+0/29JXQo0OfmzzbMayY1sPeacWxRjjL DSK3pvqtV9QqXHCP3tFkufMfg97AWX82KNXgZ/YQvGdmOkLFr+a20Usdea29R2sCYd8c 1eKA== X-Gm-Message-State: ABy/qLaRbkDchTYXWpoiu/fWDG2wCVe5iGRw1iudS6+DZNRtQ5fiDZSq DT9esVdZ9ynzNOS43O/CEaQm9w22jBuNN5qJXNk= X-Google-Smtp-Source: APBJJlHpHM2Hwae3EHq8X03yHpJ3TT8wV1liHgJFod0p9KyjjpkeViLQUmFFky1p4e17fmP8KP27A0ittukk96tVjF4= X-Received: by 2002:a17:90a:1947:b0:25f:20f:2f79 with SMTP id 7-20020a17090a194700b0025f020f2f79mr1208547pjh.4.1688107263152; Thu, 29 Jun 2023 23:41:03 -0700 (PDT) MIME-Version: 1.0 References: <55ac674d-468c-d4f5-e45e-190b25202412@gmx.de> In-Reply-To: From: Paul Richard Thomas Date: Fri, 30 Jun 2023 07:40:52 +0100 Message-ID: Subject: Re: PR82943 - Suggested patch to fix To: sgk@troutmask.apl.washington.edu Cc: Alexander Westbrooks via Fortran , Harald Anlauf , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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: Hi Alexander, I suggest that you take a look at PR82649 before going too far down the road of fixing PDT bugs. This PR underlines just how wrong the PDT representation is - mea culpa! The mechanics for constructing PDTs are in decl.cc(gfc_get_pdt_instance). They need to be turned inside out to create a container, not unlike the class containers, with {data-field(assumed rank array?), kind and len parameters}. This will then trigger all manner of failures in trans-***.cc in particular. It had been my intention to turn to PDTs after I complete my scourge of associate construct bugs. If you want to take this on, please do so and I will give you all the help that I can. You will see from PR82649 that I have been promising to get on to this for a long time but have not had the time thus far :-( If you want to get on with parsing bugs to start with, please be my guest! I notice that searching for PDT in PR title lines generates 48 hits, while the PDT meta-bug PR82173 only has 28 blockers. I will get on with the housekeeping this weekend by updating PR82173 and eliminating duplicates. Welcome, Alexander! Paul On Fri, 30 Jun 2023 at 05:42, Steve Kargl via Fortran wrote: > > On Thu, Jun 29, 2023 at 10:38:42PM -0500, Alexander Westbrooks via Fortra= n wrote: > > I have finished my testing, and updated my patch and relevant Changelog= s. I > > added 4 new tests and all the existing tests in the current testsuite > > for gfortran passed or failed as expected. Do I need to attach the test > > results here? > > Yes. It helps others also do testing to have one self-contained > patch (which I don't know to generate with git and new files :-( ). > It may also be a good idea to attach the patch and test cases to > the PR in bugzilla so that they don't accidentally get lost. > > > The platform I tested on was a Docker container running in Docker Deskt= op, > > running the "mcr.microsoft.com/devcontainers/universal:2-linux" image. > > > > I also made sure that my code changes followed the coding standards. Pl= ease > > let me know if there is anything else that I need to do. I don't have > > write-access to the repository. > > See the legal link that Harald provided. At one time, one needed to > assign copyright to the FSF with a wet-ink signature on some form. > Now, I think you just need to attest that you have the right to > provide the code to the gcc project. > > PS: Welcome to the gfortran development world. Don't be put off > if there is a delay in getting feedback/review. There are too > few contributors and too little time. If a week passes simply > ping the mailing list. I'll try to carve out some time to look > over your patch this weekend. > > -- > steve > > > > > > Thanks, > > > > Alexander > > > > On Wed, Jun 28, 2023 at 4:14=E2=80=AFPM Harald Anlauf w= rote: > > > > > Hi Alex, > > > > > > welcome to the gfortran community. It is great that you are trying > > > to get actively involved. > > > > > > You already did quite a few things right: patches shall be sent to > > > the gcc-patches ML, but Fortran reviewers usually notice them only > > > where they are copied to the fortran ML. > > > > > > There are some general recommendations on the formatting of C code, > > > like indentation, of the patches, and of the commit log entries. > > > > > > Regarding coding standards, see https://www.gnu.org/prep/standards/ . > > > > > > Regarding testcases, a recommendation is to have a look at > > > existing testcases, e.g. in gcc/testsuite/gfortran.dg/, and then > > > decide if the testcase shall test the compile-time or run-time > > > behaviour, and add the necessary dejagnu directives. > > > > > > You should also verify if your patch passes regression testing. > > > For changes to gfortran, it is usually sufficient to run > > > > > > make check-fortran -j > > > > > > where is the number of parallel tests. > > > You would need to report also the platform where you tested on. > > > > > > There is also a legal issue to consider before non-trivial patches ca= n > > > be accepted for incorporation: https://gcc.gnu.org/contribute.html#le= gal > > > > > > If your patch is accepted and if you do not have write-access to the > > > repository, one of the maintainers will likely take care of it. > > > If you become a regular contributor, you will probably want to consid= er > > > getting write access. > > > > > > Cheers, > > > Harald > > > > > > > > > > > > On 6/24/23 19:17, Alexander Westbrooks via Gcc-patches wrote: > > > > Hello, > > > > > > > > I am new to the GFortran community. Over the past two weeks I creat= ed a > > > > patch that should fix PR82943 for GFortran. I have attached it to t= his > > > > email. The patch allows the code below to compile successfully. I a= m > > > > working on creating test cases next, but I am new to the process so= it > > > may > > > > take me some time. After I make test cases, do I email them to you = as > > > well? > > > > Do I need to make a pull-request on github in order to get the patc= h > > > > reviewed? > > > > > > > > Thank you, > > > > > > > > Alexander Westbrooks > > > > > > > > module testmod > > > > > > > > public :: foo > > > > > > > > type, public :: tough_lvl_0(a, b) > > > > integer, kind :: a =3D 1 > > > > integer, len :: b > > > > contains > > > > procedure :: foo > > > > end type > > > > > > > > type, public, EXTENDS(tough_lvl_0) :: tough_lvl_1 (c) > > > > integer, len :: c > > > > contains > > > > procedure :: bar > > > > end type > > > > > > > > type, public, EXTENDS(tough_lvl_1) :: tough_lvl_2 (d) > > > > integer, len :: d > > > > contains > > > > procedure :: foobar > > > > end type > > > > > > > > contains > > > > subroutine foo(this) > > > > class(tough_lvl_0(1,*)), intent(inout) :: this > > > > end subroutine > > > > > > > > subroutine bar(this) > > > > class(tough_lvl_1(1,*,*)), intent(inout) :: this > > > > end subroutine > > > > > > > > subroutine foobar(this) > > > > class(tough_lvl_2(1,*,*,*)), intent(inout) :: this > > > > end subroutine > > > > > > > > end module > > > > > > > > PROGRAM testprogram > > > > USE testmod > > > > > > > > TYPE(tough_lvl_0(1,5)) :: test_pdt_0 > > > > TYPE(tough_lvl_1(1,5,6)) :: test_pdt_1 > > > > TYPE(tough_lvl_2(1,5,6,7)) :: test_pdt_2 > > > > > > > > CALL test_pdt_0%foo() > > > > > > > > CALL test_pdt_1%foo() > > > > CALL test_pdt_1%bar() > > > > > > > > CALL test_pdt_2%foo() > > > > CALL test_pdt_2%bar() > > > > CALL test_pdt_2%foobar() > > > > > > > > > > > > END PROGRAM testprogram > > > > > > > > > > -- > Steve --=20 "If you can't explain it simply, you don't understand it well enough" - Albert Einstein