This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/65684] New: Wrong error message when writing to a string
- From: "a.vogt at fulguritus dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 07 Apr 2015 11:27:51 +0000
- Subject: [Bug fortran/65684] New: Wrong error message when writing to a string
- Auto-submitted: auto-generated
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?