public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41152]  New: Spurious diagnostic "Extraneous characters in format"
@ 2009-08-24  8:52 burnus at gcc dot gnu dot org
  2009-08-24  9:02 ` [Bug fortran/41152] " burnus at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-24  8:52 UTC (permalink / raw)
  To: gcc-bugs

gfortran now warns for trailing characters in format statements. However, it
does not properly work as the following test case (extracted from FLEUR,
www.flapw.de) shows:

 7182 FORMAT (a3)
                      1
Warning: Extraneous characters in format at (1)

Due to committal:

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151021
Log:
2009-08-22      Bud Davis <bdavis9659@sbcglobal.net>

        PR fortran/28093
        * io.c : added variable to store original len of fmt
        * io.c (check_format): Consume H items using next_char
        in both modes to handle consecutive single quotes.
        Test for extra characters in fmt, issue warning.

Test case:
      SUBROUTINE rw_inp()
      CHARACTER(len=100) :: line

      READ(*,FMT="(4x,a)") line
 7182 FORMAT (a3)
 7130 FORMAT (i3)
      END SUBROUTINE rw_inp


-- 
           Summary: Spurious diagnostic "Extraneous characters in format"
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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

* [Bug fortran/41152] Spurious diagnostic "Extraneous characters in format"
  2009-08-24  8:52 [Bug fortran/41152] New: Spurious diagnostic "Extraneous characters in format" burnus at gcc dot gnu dot org
@ 2009-08-24  9:02 ` burnus at gcc dot gnu dot org
  2009-08-24 11:19 ` janus at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-24  9:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from burnus at gcc dot gnu dot org  2009-08-24 09:02 -------
Also the following fixed-format format looks OK to me:

        WRITE (6,'(//'' icorr is not correctly transferred. icorr='',i5)
     &    ') 42
        END

But it produces:

        WRITE (6,'(//'' icorr is not correctly transferred. icorr='',i5)
                                                                      1
Warning: Extraneous characters in format at (1)


-- 


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


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

* [Bug fortran/41152] Spurious diagnostic "Extraneous characters in format"
  2009-08-24  8:52 [Bug fortran/41152] New: Spurious diagnostic "Extraneous characters in format" burnus at gcc dot gnu dot org
  2009-08-24  9:02 ` [Bug fortran/41152] " burnus at gcc dot gnu dot org
@ 2009-08-24 11:19 ` janus at gcc dot gnu dot org
  2009-08-24 11:24 ` janus at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-08-24 11:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from janus at gcc dot gnu dot org  2009-08-24 11:19 -------
Another test case:

character(100), parameter :: subchapter='(79("-"),/,5("-")," ",A,/,79("-"),/)'
write(*,subchapter) 'test'
end


Here the error message is:

write(*,subchapter) 'test'
                                             1
Warning: Extraneous characters in format at (1)

Note that the error shows the line with the write statement, not the line
containing the format string.


-- 

janus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-08-24 11:19:15
               date|                            |


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


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

* [Bug fortran/41152] Spurious diagnostic "Extraneous characters in format"
  2009-08-24  8:52 [Bug fortran/41152] New: Spurious diagnostic "Extraneous characters in format" burnus at gcc dot gnu dot org
  2009-08-24  9:02 ` [Bug fortran/41152] " burnus at gcc dot gnu dot org
  2009-08-24 11:19 ` janus at gcc dot gnu dot org
@ 2009-08-24 11:24 ` janus at gcc dot gnu dot org
  2009-08-25  2:05 ` [Bug fortran/41152] [4.5 Regression] " bdavis at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: janus at gcc dot gnu dot org @ 2009-08-24 11:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from janus at gcc dot gnu dot org  2009-08-24 11:24 -------
(In reply to comment #0)
> Due to committal:
> 
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=151021

For me r151028 seems to work, but r151039 shows the error.


-- 


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


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

* [Bug fortran/41152] [4.5 Regression] Spurious diagnostic "Extraneous characters in format"
  2009-08-24  8:52 [Bug fortran/41152] New: Spurious diagnostic "Extraneous characters in format" burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-08-24 11:24 ` janus at gcc dot gnu dot org
@ 2009-08-25  2:05 ` bdavis at gcc dot gnu dot org
  2009-08-25 15:52 ` jsm28 at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2009-08-25  2:05 UTC (permalink / raw)
  To: gcc-bugs



-- 

bdavis at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |bdavis at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-08-24 11:19:15         |2009-08-25 02:04:57
               date|                            |


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


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

* [Bug fortran/41152] [4.5 Regression] Spurious diagnostic "Extraneous characters in format"
  2009-08-24  8:52 [Bug fortran/41152] New: Spurious diagnostic "Extraneous characters in format" burnus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-08-25  2:05 ` [Bug fortran/41152] [4.5 Regression] " bdavis at gcc dot gnu dot org
@ 2009-08-25 15:52 ` jsm28 at gcc dot gnu dot org
  2009-08-27 12:04 ` burnus at gcc dot gnu dot org
  2009-08-27 12:06 ` burnus at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-08-25 15:52 UTC (permalink / raw)
  To: gcc-bugs



-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.5.0


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


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

* [Bug fortran/41152] [4.5 Regression] Spurious diagnostic "Extraneous characters in format"
  2009-08-24  8:52 [Bug fortran/41152] New: Spurious diagnostic "Extraneous characters in format" burnus at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-08-25 15:52 ` jsm28 at gcc dot gnu dot org
@ 2009-08-27 12:04 ` burnus at gcc dot gnu dot org
  2009-08-27 12:06 ` burnus at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-27 12:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from burnus at gcc dot gnu dot org  2009-08-27 12:04 -------
The patch of PR 28093 was reverted -- thus closing as fixed.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug fortran/41152] [4.5 Regression] Spurious diagnostic "Extraneous characters in format"
  2009-08-24  8:52 [Bug fortran/41152] New: Spurious diagnostic "Extraneous characters in format" burnus at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2009-08-27 12:04 ` burnus at gcc dot gnu dot org
@ 2009-08-27 12:06 ` burnus at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-08-27 12:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from burnus at gcc dot gnu dot org  2009-08-27 12:06 -------
(In reply to comment #4)
> The patch of PR 28093 was reverted -- thus closing as fixed.

Wrong patch PR. The correct one is PR fortran/28039


-- 


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


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

end of thread, other threads:[~2009-08-27 12:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-24  8:52 [Bug fortran/41152] New: Spurious diagnostic "Extraneous characters in format" burnus at gcc dot gnu dot org
2009-08-24  9:02 ` [Bug fortran/41152] " burnus at gcc dot gnu dot org
2009-08-24 11:19 ` janus at gcc dot gnu dot org
2009-08-24 11:24 ` janus at gcc dot gnu dot org
2009-08-25  2:05 ` [Bug fortran/41152] [4.5 Regression] " bdavis at gcc dot gnu dot org
2009-08-25 15:52 ` jsm28 at gcc dot gnu dot org
2009-08-27 12:04 ` burnus at gcc dot gnu dot org
2009-08-27 12:06 ` burnus at gcc dot gnu dot org

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).