From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2A49A3858010; Wed, 4 May 2022 08:38:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A49A3858010 From: "john.harper at vuw dot ac.nz" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/105473] New: semicolon allowed when list-directed read integer with decimal='point' Date: Wed, 04 May 2022 08:38:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new 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: john.harper at vuw dot ac.nz X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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: Wed, 04 May 2022 08:38:59 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105473 Bug ID: 105473 Summary: semicolon allowed when list-directed read integer with decimal=3D'point' Product: gcc Version: 9.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: john.harper at vuw dot ac.nz Target Milestone: --- List-directed reading of a number should give an error if it reads a semico= lon and decimal is not COMMA but this 9-line program gave the output shown below it. (The ifort compiler gave a positive value of ios, which I believe was corre= ct.) ! Does list-directed reading an integer allow some non-integer input? implicit none integer n,ios character(1):: testinput =3D ';' print *,'testinput =3D "',testinput,'"' read(testinput,*,decimal=3D'point',iostat=3Dios) n print *,'n=3D',n,' ios=3D',ios if(ios>0) print *,'testinput was not an integer' end program john@johns-laptop:~/Jfh$ ./a.out testinput =3D ";" n=3D 1458129152 ios=3D 0 john@johns-laptop:~/Jfh$=