From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by sourceware.org (Postfix) with ESMTPS id 311323858D35; Wed, 28 Jun 2023 21:14:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 311323858D35 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=1687986868; x=1688591668; i=anlauf@gmx.de; bh=AFTmWGowlWeWHc8OroDOdm2DX8rQsFhMBgqoiTExq7w=; h=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To; b=EnaB13jkEEDfJ7zOmf0cUQO+64a0IJGP2khzkxhqY+aEK9DFqBLh8KkGUKkc1vGPVpvjW+Q Nx4AtUiP92ARgmEMCxG7GCIkzEzXXEwuuUWGvBRxjKb4ueTf9aaxzsGow1N/2dhefuPfLIhhZ UIByaMGD3exNN8cLmBaev1iemIg8p9Ky4cKviqbnCFJiP8lLmwjCrxuBgm69aOi+7O31MSddK H0PAKrKWlaHAD2Nfb1dZEpMGS1CLTD0kqh3H0DOZqCIpP2ntX5Qnc631wyfA+p9sMEWvQO8Qx pEVzF2cxbhhJ1MXwNmbDmEovxs7TE64VajVlto0o7kXVY9suq7cw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.178.29] ([93.207.80.85]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N33Ib-1q2hq51OdZ-013Jpi; Wed, 28 Jun 2023 23:14:28 +0200 Message-ID: <55ac674d-468c-d4f5-e45e-190b25202412@gmx.de> Date: Wed, 28 Jun 2023 23:14:27 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: PR82943 - Suggested patch to fix To: Alexander Westbrooks , fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org 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:BNGMcCt85UHRAbpuQaYiLCPtrCEezdO3LFD1v+I04AIQDdh1pqI ePQvWZIB4mxiwmBfDgugNoZwQUTLYrX8VMqOMaTDiHjTRPPZ6SNsYioOZdx7qM59+LxZe8t 9T1Ctu7AR+um4S1B4MjX9MNo97qC8gT9HJi4KMAkWBk5u9U7bVMU6TIGy9Is/cJR1SjK5Sk GFJL5QNOLnkjMNis6VoYw== UI-OutboundReport: notjunk:1;M01:P0:YLgDNig5ly8=;R0ApVOl2XUCJALBXPqfy6+lsDHi ZJhB6IA0KLS4nvROAHtRQYPFpzCx1Q/ekVq1L71eS9Xn0K3OKcwFM+ojKK9z/3FTxKJzr+bPJ yQ/xCFCeXK/iypPAV+BowGHfUX+U+BCRLVbvXXAtH0M5p6vZ+418ihuqmOS1P7wIIG5EnZAMq iPptW4lDd3L3QAg9nB4iewYnrcuVzZi7wcBawB49vlpRRCOSTzfqODdEtaGB6ysEomW8a49Qp tKyMWWlLZVZSi+3mPqnZQnUxW8iisOUOo8c0UGJ4kRoMDsvbomGQQ9vo6ISnSBdvV/OAjq3o0 ll6CQlqbxt+CTcQJAXzzRfZg9Ypq57e1+U6O1deLt7HGza2vxZdfJFAt/4zlm+lZAqXDUxz6t d17CMPapwXDZtdTMB6o/yrP+LABYf0E/b/DRTELfFMBlvb+akYI7ADmqrf2jChUq/Qi7XxcQS d6PG0UPTZhnTXg6hCRjFr5m41Li4nhVW/1raF66CvSUX2Jk46kra7vgE4AXNiSF4Qh0PbOnIU NRd4fSnyVA+k91YUzZa1MhrDqcJ8t6a405/PRtuo1iH5zs5gRm3aIUix2QZcxu/NRmkn5GEuI 8rNtw+1faSGsDWrcqczaYAsWUAw/n1W307Jny4pse2I65Zbpn31UrJx7o97d6/ISe5to72wFq H8evFC7GVY8uohza2/ocIdF3WxCXkNb3S1Md6h081ksvcS+FPuqy//otfgmDD2w/TZl9YLQKz lylzvcmZyamhebPeGZS7f3ZiZpsClo5109vsfL/0uXOwl9YdF0xAbKne5oAN86c8iQ3yfJ8ZF uDS77jXWUYiCIX3iUKBgCz46YH1jG+cDfAq1WbHXKClxYAWgyzcTBBwaYRx21PVmJ35Qti97v Ex73YmibcURtac8YOKqULxu6K2fEmv+bTsL8qEBtQA26NXDezVA2sQ91dGedBdYYGLrhPGUoI wUy1wA4+xoOAAX4kia6GTZZR+vU= X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 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 can be accepted for incorporation: https://gcc.gnu.org/contribute.html#legal 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 consider 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 created a > patch that should fix PR82943 for GFortran. I have attached it to this > email. The patch allows the code below to compile successfully. I am > working on creating test cases next, but I am new to the process so it m= ay > take me some time. After I make test cases, do I email them to you as we= ll? > Do I need to make a pull-request on github in order to get the patch > 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 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 9822E3858C39 for ; Wed, 28 Jun 2023 21:14:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9822E3858C39 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 1qEcUk-0004Aq-EI for gcc-patches@gcc.gnu.org; Wed, 28 Jun 2023 23:14:34 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: gcc-patches@gcc.gnu.org From: Harald Anlauf Subject: Re: PR82943 - Suggested patch to fix Date: Wed, 28 Jun 2023 23:14:27 +0200 Message-ID: <55ac674d-468c-d4f5-e45e-190b25202412@gmx.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US In-Reply-To: Cc: fortran@gcc.gnu.org X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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: <20230628211427.h2NRlprlWseKcsUSk0trDc8xvrBHLsiQDQ_4DgIrA7g@z> 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 can be accepted for incorporation: https://gcc.gnu.org/contribute.html#legal 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 consider 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 created a > patch that should fix PR82943 for GFortran. I have attached it to this > email. The patch allows the code below to compile successfully. I am > 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 patch > reviewed? > > Thank you, > > Alexander Westbrooks > > module testmod > > public :: foo > > type, public :: tough_lvl_0(a, b) > integer, kind :: a = 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