This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/78881] [F03] reading from string with DTIO procedure does not work properly
- From: "jvdelisle at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 28 Mar 2017 15:25:13 +0000
- Subject: [Bug fortran/78881] [F03] reading from string with DTIO procedure does not work properly
- Auto-submitted: auto-generated
- References: <bug-78881-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78881
--- Comment #18 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
(In reply to ro@CeBiTec.Uni-Bielefeld.DE from comment #17)
>
> ro@colima 27 >
> LD_LIBRARY_PATH=../../../sparc-sun-solaris2.12/sparcv9/libgfortran/.libs
> ./dtio_26.exe
>
>
>
> Program aborted. Backtrace:
> Abort
I am sorry, I was not being clear. There are four similar lines that need to
replace abort with the print. We are invoking the Fortran ABORT procedure when
ever a test condition is not met. So I need to see what the condition is saved
in the iomsg variable and which line without aborting.
So something like this in place of the lines starting at line 57:
read(unit=10, fmt='(dt)', iostat=istat, iomsg=imsg) foo
if (imsg.ne."End of record") print *, 57, imsg
rewind(10)
read(unit=10, fmt=*, iostat=istat, iomsg=imsg) foo
if (imsg.ne."End of record") print *, 60, imsg
s = "hello"
read( unit=s, fmt='(dt)', iostat=istat, iomsg=imsg) foo
if (imsg.ne."End of record") print *, 63, imsg
read( unit=s, fmt=*, iostat=istat, iomsg=imsg) foo
if (imsg.ne."End of record") print *, 65
end program p