public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/56675] New: I/O: Check edit descriptors with READ/WRITE used in FORMAT statements
@ 2013-03-21 12:34 burnus at gcc dot gnu.org
  2014-01-14 23:15 ` [Bug fortran/56675] " dominiq at lps dot ens.fr
  2020-07-25  9:45 ` dominiq at lps dot ens.fr
  0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-03-21 12:34 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56675

             Bug #: 56675
           Summary: I/O: Check edit descriptors with READ/WRITE used in
                    FORMAT statements
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


https://groups.google.com/forum/#!topic/comp.lang.fortran/BxWaYSkmV2w

The following code shows that the special checks for READ/WRITE/PRINT do not
get checked for with FORMAT but only with a string.

Seemingly, the format is checked when FORMAT is encountered - one should
consider to do additionally a check if READ/WRITE/PRINT is used.

[The latter becomes even more useful when looking at the types of the arguments
(e.g. "a" edit descriptor with a "real" expression/variable). However,
currently this is only checked at run time. For compile time, it should be
doable if the I/O list doesn't contain nonconst-shape arrays and no
io-do-lists.]




  implicit none
  integer :: z

! OK: Diagnosed.  (Side note: Also diagnosed by NAG.)
!  character(len=*), parameter :: str = '(i0)'
!  read  (*,str) z ! Positive width required in format string
!  read  (*,"(i0)") z ! "Positive width required in format string"

! Not diagnosed but diagnosable. (Also not diagnosed by NAG.)
  read  (*, 99) z ! 'Wrongly' accepted (at compile time)
  99 FORMAT (i0)  ! (gives error at run time)

! RFC: Validly rejected or not? (Note: Also rejected by NAG)
!   read (*, 100) z   ! Rejected at run time (but not used;
!   100 FORMAT (i2,i0)! may it reject it or not?)
end


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/56675] I/O: Check edit descriptors with READ/WRITE used in FORMAT statements
  2013-03-21 12:34 [Bug fortran/56675] New: I/O: Check edit descriptors with READ/WRITE used in FORMAT statements burnus at gcc dot gnu.org
@ 2014-01-14 23:15 ` dominiq at lps dot ens.fr
  2020-07-25  9:45 ` dominiq at lps dot ens.fr
  1 sibling, 0 replies; 3+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-01-14 23:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56675

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-01-14
     Ever confirmed|0                           |1

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Related to pr28397 if not a duplicate.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug fortran/56675] I/O: Check edit descriptors with READ/WRITE used in FORMAT statements
  2013-03-21 12:34 [Bug fortran/56675] New: I/O: Check edit descriptors with READ/WRITE used in FORMAT statements burnus at gcc dot gnu.org
  2014-01-14 23:15 ` [Bug fortran/56675] " dominiq at lps dot ens.fr
@ 2020-07-25  9:45 ` dominiq at lps dot ens.fr
  1 sibling, 0 replies; 3+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-07-25  9:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Let us handle this case with pr28397.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-25  9:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-21 12:34 [Bug fortran/56675] New: I/O: Check edit descriptors with READ/WRITE used in FORMAT statements burnus at gcc dot gnu.org
2014-01-14 23:15 ` [Bug fortran/56675] " dominiq at lps dot ens.fr
2020-07-25  9:45 ` dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).