This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/78881] [F03] reading from string with DTIO procedure does not work properly


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]