From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5D1C13858D28; Sat, 14 May 2022 22:00:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5D1C13858D28 From: "jvdelisle at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/105473] semicolon allowed when list-directed read integer with decimal='point' Date: Sat, 14 May 2022 22:00:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 9.4.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jvdelisle 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 May 2022 22:00:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105473 --- Comment #7 from Jerry DeLisle --- My apologies for taking some time to get back to this. After a closer look= , I realize that in the original test case there is no problem. The semicolon = is an acceptable value separator regardless of decimal=3D'point' or decimal=3D= 'comma' Take these two examples: 1) The comma is the decimal keeper so semicolon must be used as the separat= or implicit none integer n,m,ios real r character(20):: testinput =3D '1;17;3,14159' n =3D 999 print *,'testinput =3D "',testinput,'"' read(testinput,*,decimal=3D'comma', iostat=3Dios) n, m, r print *,'n=3D',n,' m=3D ', m,' r=3D ', r,' ios=3D',ios if(ios>0) print *,'testinput was not an integer' end program 2) The point is the decimal keeper so semicolon may be used as the separato= r or a comma implicit none integer n,m,ios real r character(20):: testinput =3D '1;17;3.14159' n =3D 999 print *,'testinput =3D "',testinput,'"' read(testinput,*,decimal=3D'point', iostat=3Dios) n, m, r print *,'n=3D',n,' m=3D ', m,' r=3D ', r,' ios=3D',ios if(ios>0) print *,'testinput was not an integer' end program In the original test case, the semicolon is a separator and is simply ending the read as no value is there.=