This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/66643] New: Missing compilation error for formatted data transfer without format
- From: "gerhard dot steinmetz dot fortran at t-online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 23 Jun 2015 16:15:22 +0000
- Subject: [Bug fortran/66643] New: Missing compilation error for formatted data transfer without format
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66643
Bug ID: 66643
Summary: Missing compilation error for formatted data transfer
without format
Product: gcc
Version: 5.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gerhard.steinmetz.fortran@t-online.de
Target Milestone: ---
For read/write an io-unit that is an asterisk (*) identifies an
external unit that is preconnected for sequential formatted output.
Then a format (fmt) is needed. If not given, no warning or error
message at compile time now, but always an error at runtime.
Unavoidable. I was wondering if this is standard conforming at all.
$ cat z_write_fmt_missing.f90
program p
write (*) 1
write (*) 'a'
end
$ gfortran -g -O0 -Wall -fcheck=all z_write_fmt_missing.f90
$ a.out
At line 2 of file z_write_fmt_missing.f90 (unit = 6, file = 'stdout')
Fortran runtime error: Missing format for FORMATTED data transfer
$ cat z_read_fmt_missing.f90
program p
read (*) i
end
$ gfortran -g -O0 -Wall -fcheck=all z_read_fmt_missing.f90
$ a.out
At line 2 of file z_read_fmt_missing.f90 (unit = 5, file = 'stdin')
Fortran runtime error: Missing format for FORMATTED data transfer
An error message could/should be given at compile time.