[Bug fortran/66643] Missing compilation error for formatted data transfer without format

2016-09-30 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66643

Jerry DeLisle  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #8 from Jerry DeLisle  ---
Fixed on trunk

[Bug fortran/66643] Missing compilation error for formatted data transfer without format

2016-09-30 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66643

--- Comment #7 from Jerry DeLisle  ---
Author: jvdelisle
Date: Fri Sep 30 23:19:58 2016
New Revision: 240686

URL: https://gcc.gnu.org/viewcvs?rev=240686=gcc=rev
Log:
2016-09-30  Jerry DeLisle  

PR fortran/66643
* io.c (match_dt_unit): Peek check for missing format.

* gfortran.fortran-torture/compile/arrayio.f90: Update test.
* gfortran.fortran-torture/compile/write.f90: Update test.

Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/io.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.fortran-torture/compile/arrayio.f90
trunk/gcc/testsuite/gfortran.fortran-torture/compile/write.f90

[Bug fortran/66643] Missing compilation error for formatted data transfer without format

2016-04-07 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66643

--- Comment #6 from Dominique d'Humieres  ---
Note the extra comma in gfortran.dg/integer_exponentiation_6.F90 (see pr60751).
Any reason to keep it?

[Bug fortran/66643] Missing compilation error for formatted data transfer without format

2016-03-14 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66643

--- Comment #5 from Dominique d'Humieres  ---
> Created attachment 37610 [details]
> A preliminary patch
>
> Attached patch gives a diagnostic. Interestingly I found three test cases
> in the test suite that use the invalid construct.

Works as expected without regression.

[Bug fortran/66643] Missing compilation error for formatted data transfer without format

2016-02-06 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66643

--- Comment #4 from Jerry DeLisle  ---
Created attachment 37610
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37610=edit
A preliminary patch

Attached patch gives a diagnostic. Interestingly I found three test cases in
the test suite that use the invalid construct.

[Bug fortran/66643] Missing compilation error for formatted data transfer without format

2015-06-24 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66643

Jerry DeLisle jvdelisle at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jvdelisle at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |jvdelisle at gcc dot 
gnu.org

--- Comment #3 from Jerry DeLisle jvdelisle at gcc dot gnu.org ---
I will take this one.  It seems we could detect this as a useful diagnostic.


[Bug fortran/66643] Missing compilation error for formatted data transfer without format

2015-06-23 Thread gerhard.steinmetz.fort...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66643

--- Comment #1 from Gerhard Steinmetz gerhard.steinmetz.fort...@t-online.de 
---
Minimalistic code :

$ cat z_write_none.f90
program p
   write (*)
end

$ gfortran -g -O0 -Wall -fcheck=all z_write_none.f90
$ a.out
At line 2 of file z_write_none.f90 (unit = 6, file = 'stdout')
Fortran runtime error: Missing format for FORMATTED data transfer

---

As already known, correct code might look like :

$ cat z_write_fmt_ok.f90
program p
   write (*, *) 1
   print *, 'a'
   print *
end


[Bug fortran/66643] Missing compilation error for formatted data transfer without format

2015-06-23 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66643

Dominique d'Humieres dominiq at lps dot ens.fr changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-06-23
 Ever confirmed|0   |1
   Severity|normal  |enhancement

--- Comment #2 from Dominique d'Humieres dominiq at lps dot ens.fr ---
I think the relevant constrain in the standard is

 9.6.4.5.2 Unformatted data transfer

 1 If the file is not connected for unformatted input/output, unformatted data
 transfer is prohibited.

AFAIU the restriction is on the user and not on the compiler, even if I agree
that it would be better to have it detected at compile time.

This is related to pr28397 and pr 56675.

AFAICT this is not a regression (I see it on 4.3.1).