[Bug fortran/66708] Possible (minor) improvement on formatted io with format too short

2019-01-29 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66708

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #3 from Dominique d'Humieres  ---
Duplicate of pr27436.

*** This bug has been marked as a duplicate of bug 27436 ***

[Bug fortran/66708] Possible (minor) improvement on formatted io with format too short

2015-09-08 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66708

Dominique d'Humieres  changed:

   What|Removed |Added

   Priority|P3  |P5
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-09-08
 Ever confirmed|0   |1

--- Comment #2 from Dominique d'Humieres  ---
Marked as NEW with low priority.

Related to pr28397.


[Bug fortran/66708] Possible (minor) improvement on formatted io with format too short

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

Gerhard Steinmetz gerhard.steinmetz.fort...@t-online.de changed:

   What|Removed |Added

   Severity|normal  |enhancement

--- Comment #1 from Gerhard Steinmetz gerhard.steinmetz.fort...@t-online.de 
---
Formatted read or write with no variable list needs a format (fmt)
string longer than one character.
This is checked already -- partly -- but very good, indeed.
Please take a look at the message text.


$ cat z_write_fmt_too_short_1.f90
program p
   character(1), parameter :: fmt1 = '('
   character(1) :: fmt2 = '('
   write (*, fmt1)
   write (*, fmt2)
   write (*, '(')
end


$ gfortran -g -O0 -Wall -fcheck=all z_write_fmt_too_short_1.f90
z_write_fmt_too_short_1.f90:4:14:

write (*, fmt1)
  1
Error: Unexpected end of format string in format string at (1)
z_write_fmt_too_short_1.f90:6:14: Error: Unexpected end of format string in
format string at (1)

---

$ cat z_write_fmt_too_short_0.f90
program p
   character(1), parameter :: fmt1 = '('
   character(1) :: fmt2 = '('
   write (*, fmt1(1:0))
   write (*, fmt2(1:0))
   write (*, '')
end


$ gfortran z_write_fmt_too_short_0.f90
z_write_fmt_too_short_0.f90:4:13:

write (*, fmt1(1:0))
 1
Error: Missing leading left parenthesis in format string at (1)
z_write_fmt_too_short_0.f90:6:13:

write (*, '')
 1
Error: Missing leading left parenthesis in format string at (1)