From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by sourceware.org (Postfix) with ESMTPS id D64C03858C2C; Tue, 2 Jan 2024 19:31:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D64C03858C2C Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmx.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org D64C03858C2C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=212.227.15.19 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704223883; cv=none; b=hWZDq3ZiTnByoK06wxpsK5iD/Zk1PWM696bm9EJ3yd+csfb1ArGeia06gZfqj0BUMhn2P7Yc2jUg3yl7y78qNjfH8KgnjmwfkxBVfM114NOShmLnJ+3GSSFDOuG5EkpkOOvIiWAcNgHX4MpoOylQi9lbdpqrGWe0FmU3eMWwh0k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704223883; c=relaxed/simple; bh=1N2FMd3hHMhixG4Ogh9X15HFIO1mWGKvFg3WAzPC9lY=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=AflyRPwhDmzgpHWg5m8pJ/GU2EcUpi63RPpD58Fl/6YutFpoPACpp/G5Iz4kZ8HowUu0ed8cwHRv6xgGhpJYGt0xkOLOD2wltibLUepTDz1QwXcCv9b/4ZhPwFEg7M0ytdS1G1iZLRNt2f1q35wy/nyG2YUm25Fz/pdwPqTSGMk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1704223877; x=1704828677; i=anlauf@gmx.de; bh=1N2FMd3hHMhixG4Ogh9X15HFIO1mWGKvFg3WAzPC9lY=; h=X-UI-Sender-Class:Date:Subject:To:References:From:In-Reply-To; b=Z0NublDM2pPs7Bdkr9UldPKhtTGJz1UmGvhwgTcCqhmnE4ypuw6ULfxW4TwGf6JV cRk2ldeXFEOOFSWX64KleOjNwaYtsAc+n+qb6HHaFP6wkYxy35iXCcmg5P7kgyo1N 3yu3dTZ10o8RjotoHQ6OaOnH8cu2lrxgk7TDDvecT5Ews6ueEgkS6HUFKh2zIP9r+ jvsHjQo6gc+92IwRmMXmpZNdchA0fIMc2NHA9/IZ6I/yNXABgpw9acMJBVldULalE c3rHg2BPvUwpCMlq3RZ+bPlY1WRS5JFmHOM9YhKBabjk0NE2Ysf9AXSxtLtKXUG4M 0csTcWXNlaYzsrq56g== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.178.29] ([93.207.86.100]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MvK0R-1r3UiD3mnx-00rFMg; Tue, 02 Jan 2024 20:31:16 +0100 Message-ID: Date: Tue, 2 Jan 2024 20:31:15 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Patch] Fortran: Accept -std=f2023, update line-length for Fortran 2023 To: Tobias Burnus , gcc-patches , fortran Newsgroups: gmane.comp.gcc.patches,gmane.comp.gcc.fortran References: <750b022e-0291-4d35-9cd1-0957023cbb4a@gmx.de> <6b62f178-e3c4-4bdb-b7cc-eb57477cd27d@codesourcery.com> Content-Language: en-US From: Harald Anlauf In-Reply-To: <6b62f178-e3c4-4bdb-b7cc-eb57477cd27d@codesourcery.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:HXLB+nxeO1osjg2aYlmG4o/AsCCQPNGsbgiKlZxAXERSxOOIwwW bHd4RnI7FMfoL5NJLK9pAeFv3KPFWtMfok/nJfNPMmJ+FcMftS+OAlE80bOD1g3wVBnVZYX J17Mb94ik0gVrEgW6Cz+amVffT6c7uy3zawzF/zi4JpcZ1JPMYmJk2evFQKIkoPrJ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HAujgLI3sNN/kHJXcRh3PRHfOBmqK4ob4RZ+QxnCgPl+CIBJR5E7zGiOVg== X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,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: Dear all, we might want to update changes.html to reflect this. How about: diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index 403feb06..9b16f5e3 100644 =2D-- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/changes.html @@ -284,6 +284,11 @@ a work-in-progress.

Fortran

    +
  • The compiler now accepts the -std=3Df2023 option, whic= h + has been added in preparation of support of Fortran 2023. This optio= n + increases the line-length limit for source in free-form to 10000, and + statements may have up to 1 million characters. +
  • With the -save-temps option, preprocessed files with the .fii extension will be generated from free-form source files such as .F90 and Cheers, Harald Am 17.11.23 um 12:38 schrieb Tobias Burnus: > Hi Harald, hi all, > > On 16.11.23 20:30, Harald Anlauf wrote: >> On 11/16/23 14:01, Tobias Burnus wrote: >>> This adds -std=3Df2023, which is mostly a prep patch for future change= s. > ... >>> (B) In "6.3.2.6 Free form statements": >>> Fortran 2018: "A statement shall not have more than 255 continuation >>> lines." >>> Fortran 2023: "A statement shall not have more than one million >>> characters." >> >> this is really a funny change: we're not really prepared to handle >> this. > > I can confirm this. I tried to get it working in scanner.cc but due to > the re-parsing it is quite difficult to get it right; the main problem > is that we keep reparsing code ("gfc_current_locus =3D old_loc"), such > that a simple count will be wrong. > > =E2=86=92 Now tracked at https://gcc.gnu.org/PR112586 > > >> According to the standard one can have 999999 lines with only >> "&" and then an ";", but then only 100 lines with 10000 characters. > > I believe a single '&' is not valid, you either need '&&' or something > else + '&'; thus, you can have only half a million lines + 1. > > In the code, I still use 1,000,000 but now with a comment. > >> There is a similar wording for fixed-form which you overlooked: > Ups - fixed. >> If you think that we need testcases for fixed-form, add them, >> or forget them.=C2=A0 I don't bother. > I added one. > >> - there are existing testcases continuation_5.f, continuation_6.f, >> =C2=A0 thus I suggest to rename your new continuation_{5,6}.f90 to >> =C2=A0 continuation_17.f90+ . > > Done. We are rather inconsistent whether we enumerate .f{,90} > together or separately; as the suffix is shown, either works. > >> >> - I don't understand your new testcase line_length_14.f90 . >> =C2=A0 This is supposed to test -std=3Dgnu, but then -std=3Dgnu is not = a >> =C2=A0 standard but a moving target, which is why you had to adjust >> =C2=A0 existing testcases. >> =C2=A0 So what does it buy us beyond line_length_1{2,3}.f90 ? > > Well, it ensures that the warning is not only shown for -std=3Df2023 but > also for -std=3Df2028 and (current -std=3Dgnu). In general, I think it i= s > useful to check the lower and the upper bound. > > I have now removed it - as it is unlikely that we would regress on such > changes. > >>> PPS: I did not bother adding .f23 as file extension; I believe that al= so >>> .f18 is unsupported. >> I never use extensions other than .f90 for portable code. > > Likewise=C2=A0 - especially as '.f95' starts out as Fortran code that > complies to -std=3Df95 but slowly Fortran 2003 or later code creeps in. = I > think that's fine but then one can also directly use .f90. (Most code > does so.) > > Unless there are follow up comments, I will commit it later today. > > Thanks for the comments! > > Tobias > > PS: I fixed the wording issue in the subject line of the email and > header. I first wrote 'support' but that sounded a bit as if F2023 is > supported. Hence, I wrote 'Accept' and did not remove 'support'. > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe = 201, > 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: > Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaft: M=C3=BCnchen; > Registergericht M=C3=BCnchen, HRB 106955 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 283AE3858C2F for ; Tue, 2 Jan 2024 19:31:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 283AE3858C2F Authentication-Results: sourceware.org; dmarc=fail (p=quarantine dis=none) header.from=gmx.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=m.gmane-mx.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 283AE3858C2F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=116.202.254.214 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704223886; cv=none; b=Cxq7tzz+3UUDJLG2kZdD3q8Jicl8UlZskuVs0pf5ZfZrlzV5esIjAsDyoGt4kN1mLaSh/3ebag0+8H/D7hLvA4LwNk1a8XzLs/fb7R1U29goMYORfgAr8f+S4ZTpXcp5Be5V8GUzoY9uPrGL+21AfnLYSfJA7Z0P8cZ85dRaYQ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704223886; c=relaxed/simple; bh=7LqO0vZzJbCNpZLHgFe2+FGPYFB2glhSc7V86K/0xcU=; h=To:From:Subject:Date:Message-ID:Mime-Version; b=eTPRMhzonM2sI9bmhHVQmnutOUDn2NWHYWIODX2kpV7ht658BBwbW1uD8VipX8FsHzRqbnLzlenikkP5QSrg9p0+/6DUdeSrqeCbfwTscEo2InPcCsVnt+VUA1HYgf2aRwhk7R8QEmiNzhaJofujDsqY2UfbV8oIHRAxGQHjO3s= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1rKkTy-0000iX-9m for gcc-patches@gcc.gnu.org; Tue, 02 Jan 2024 20:31:22 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gcc-patches@gcc.gnu.org From: Harald Anlauf Subject: Re: [Patch] Fortran: Accept -std=f2023, update line-length for Fortran 2023 Date: Tue, 2 Jan 2024 20:31:15 +0100 Message-ID: References: <750b022e-0291-4d35-9cd1-0957023cbb4a@gmx.de> <6b62f178-e3c4-4bdb-b7cc-eb57477cd27d@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla Thunderbird Content-Language: en-US In-Reply-To: <6b62f178-e3c4-4bdb-b7cc-eb57477cd27d@codesourcery.com> Cc: fortran@gcc.gnu.org X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,KAM_SHORT,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: Message-ID: <20240102193115.MKIW1urEVicdq1G7a4KKfAlK0Kwq9XHsfLIYHVp22vY@z> Dear all, we might want to update changes.html to reflect this. How about: diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index 403feb06..9b16f5e3 100644 --- a/htdocs/gcc-14/changes.html +++ b/htdocs/gcc-14/changes.html @@ -284,6 +284,11 @@ a work-in-progress.

    Fortran

      +
    • The compiler now accepts the -std=f2023 option, which + has been added in preparation of support of Fortran 2023. This option + increases the line-length limit for source in free-form to 10000, and + statements may have up to 1 million characters. +
    • With the -save-temps option, preprocessed files with the .fii extension will be generated from free-form source files such as .F90 and Cheers, Harald Am 17.11.23 um 12:38 schrieb Tobias Burnus: > Hi Harald, hi all, > > On 16.11.23 20:30, Harald Anlauf wrote: >> On 11/16/23 14:01, Tobias Burnus wrote: >>> This adds -std=f2023, which is mostly a prep patch for future changes. > ... >>> (B) In "6.3.2.6 Free form statements": >>> Fortran 2018: "A statement shall not have more than 255 continuation >>> lines." >>> Fortran 2023: "A statement shall not have more than one million >>> characters." >> >> this is really a funny change: we're not really prepared to handle >> this. > > I can confirm this. I tried to get it working in scanner.cc but due to > the re-parsing it is quite difficult to get it right; the main problem > is that we keep reparsing code ("gfc_current_locus = old_loc"), such > that a simple count will be wrong. > > → Now tracked at https://gcc.gnu.org/PR112586 > > >> According to the standard one can have 999999 lines with only >> "&" and then an ";", but then only 100 lines with 10000 characters. > > I believe a single '&' is not valid, you either need '&&' or something > else + '&'; thus, you can have only half a million lines + 1. > > In the code, I still use 1,000,000 but now with a comment. > >> There is a similar wording for fixed-form which you overlooked: > Ups - fixed. >> If you think that we need testcases for fixed-form, add them, >> or forget them.  I don't bother. > I added one. > >> - there are existing testcases continuation_5.f, continuation_6.f, >>   thus I suggest to rename your new continuation_{5,6}.f90 to >>   continuation_17.f90+ . > > Done. We are rather inconsistent whether we enumerate .f{,90} > together or separately; as the suffix is shown, either works. > >> >> - I don't understand your new testcase line_length_14.f90 . >>   This is supposed to test -std=gnu, but then -std=gnu is not a >>   standard but a moving target, which is why you had to adjust >>   existing testcases. >>   So what does it buy us beyond line_length_1{2,3}.f90 ? > > Well, it ensures that the warning is not only shown for -std=f2023 but > also for -std=f2028 and (current -std=gnu). In general, I think it is > useful to check the lower and the upper bound. > > I have now removed it - as it is unlikely that we would regress on such > changes. > >>> PPS: I did not bother adding .f23 as file extension; I believe that also >>> .f18 is unsupported. >> I never use extensions other than .f90 for portable code. > > Likewise  - especially as '.f95' starts out as Fortran code that > complies to -std=f95 but slowly Fortran 2003 or later code creeps in. I > think that's fine but then one can also directly use .f90. (Most code > does so.) > > Unless there are follow up comments, I will commit it later today. > > Thanks for the comments! > > Tobias > > PS: I fixed the wording issue in the subject line of the email and > header. I first wrote 'support' but that sounded a bit as if F2023 is > supported. Hence, I wrote 'Accept' and did not remove 'support'. > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, > 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: > Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; > Registergericht München, HRB 106955