From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B8DBA38582AD; Tue, 12 Mar 2024 08:52:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B8DBA38582AD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1710233544; bh=nGGszqmzp46Z1ZmYHgDPLvnNKHD/dcXYwepT0Y0perM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=YmbyR6992IiZXxiO6E1EN/tfBC5N2KDB2VWrbJioJ3oZGJnFPazjbv8Vg2w2tNS4e 8F2n9vsdBaG60Scn3TFcD8qQCpS/VVP3Ubh1B8z3lzqDreKPqyTbUFSS4LZQ0xs3UV kdxaTkaRIcV3BUlEwKE+d6Cqv9GE72y9h+P05r+o= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: =?UTF-8?B?W0J1ZyBsaWJmb3J0cmFuLzExNDMwNF0gWzEzLzE0IFJlZ3Jlc3Np?= =?UTF-8?B?b25dIGxpYmdmb3J0cmFuIEkvTyDigJMgYm9ndXMgIlNlbWljb2xvbiBub3Qg?= =?UTF-8?B?YWxsb3dlZCBhcyBzZXBhcmF0b3Igd2l0aCBERUNJTUFMPSdwb2ludCci?= Date: Tue, 12 Mar 2024 08:52:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jvdelisle at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D114304 --- Comment #14 from Tobias Burnus --- Created attachment 57680 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D57680&action=3Dedit Testcase with decimal=3DCOMMA, passes with ifort/ifx/flang - fails with gfo= rtran > commit r14-9432-g0c179654c3170749f3fb3232f2442fcbc99bffbb > commit r13-8417-g824a71f609b37a8121793075b175e2bbe14fdb82 Thanks for the fix. We are now back to the GCC 13 result =E2=86=92 comment 4 Namely, attachment 57668 now gives: 1.23434997 1243.23999 13.2399998 a 1.23434997 1243.23999 13.2399998 a 1.23434997 1243.23999 13.2399998=20=20=20=20 1.23434997 1243.23999 13.2399998=20=20=20=20 At line 33 of file foo.f90 (unit =3D 99, file =3D 'foo.inp') * * * The question is whether the following show give an error as shown above: real :: x(3) character(len=3D1) :: s ... write(99, '(a)') '1.23435 1243.24 13.24 ;' read(99, *) x, s Or whether reading this line should work, i.e. reading ';' as character =E2= =80=93 as it does with ifort and flang. Or in other words: * Does ';' count as character, readable by list-directed formatted I/O? (if= ort, ifx, flang) * Or doesn't it? (gfortran since at least 4.9) * * * In F2023 (23-007r1), "13.10.2 Values and value separators": "A value separator is =E2=80=A2 a comma optionally preceded by one or more contiguous blanks and optionally followed by one or more contiguous blanks, unless the decimal edit mode is COMMA, in which case a semicolon is used in place of the comma, =E2=80=A2 a slash optionally preceded by one or more contiguous blanks and optionally followed by one or more contiguous blanks, or =E2=80=A2 one or more contiguous blanks between two nonblank values or following the last nonblank value, where a nonblank value is a constant, an r*c form, or an r* form." (where 'r' is an positive integer and 'c' is a literal constant [with ...].) To me it reads as if the semicolon should be read just fine. * * * I now have tried another testcase with decimal=3DCOMMA, which works just fi= ne with ifort / ifx /flang as shown at https://godbolt.org/z/ajeTjzEfY But with GCC it fails with: Fortran runtime error: Comma not allowed as separator with DECIMAL=3D'com= ma' See godbolt link above for gfortran vs. ifort vs. ifx. vs. flang or the attached testcase.=