From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8064B3858C51; Mon, 2 May 2022 16:49:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8064B3858C51 From: "tkoenig at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/105456] New: Child I/O does not propage iostat Date: Mon, 02 May 2022 16:49:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tkoenig at gcc dot gnu.org 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: Mon, 02 May 2022 16:49:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105456 Bug ID: 105456 Summary: Child I/O does not propage iostat Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran Assignee: unassigned at gcc dot gnu.org Reporter: tkoenig at gcc dot gnu.org Target Milestone: --- The program module sk1 implicit none type char character :: ch end type char interface read (formatted) module procedure read_formatted end interface read (formatted) contains subroutine read_formatted (dtv, unit, iotype, vlist, iostat, iomsg) class (char), intent(inout) :: dtv integer, intent(in) :: unit character (len=3D*), intent(in) :: iotype integer, intent(in) :: vlist(:) integer, intent(out) :: iostat character (len=3D*), intent(inout) :: iomsg character :: ch read (unit,fmt=3D'(A1)', advance=3D"no", iostat=3Diostat, iomsg=3Diomsg= ) ch iostat =3D 42 dtv%ch =3D ch end subroutine read_formatted end module sk1 program skip1 use sk1 implicit none type (char) :: x open (10,status=3D"scratch") write (10,'(A)') '', 'a' rewind (10) read (10,*) x write (*,'(10(A))') "Read: '",x%ch,"'" end program skip1 runs to completion, but it should propagate the iostat to the caller and error out on the read.=