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/65684] New: Wrong error message when writing to a string


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65684

            Bug ID: 65684
           Summary: Wrong error message when writing to a string
           Product: gcc
           Version: 4.9.3
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: a.vogt at fulguritus dot com

gfortran gives the wrong output when writing to a string that is too short: 

Compiling and running this snippet

program test
  implicit none
  character(2) :: str

  write(str,*) 100

  print *, str
end program


results in 
> At line 5 of file test.F90
> Fortran runtime error: End of record

ifort, on the other hand, gives the correct error message: 

> forrtl: severe (66): output statement overflows record, unit -5, file Internal List-Directed Write

Could the gfortran error message be adjusted?


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