public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35882]  New: Miscounted continuation lines when interspersed with data
@ 2008-04-09  8:08 J dot Hogg at rl dot ac dot uk
  2008-04-09  9:06 ` [Bug fortran/35882] " burnus at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: J dot Hogg at rl dot ac dot uk @ 2008-04-09  8:08 UTC (permalink / raw)
  To: gcc-bugs

gfortran seems to misreport a warning about exceeding the number of
continuation lines limit (39 lines of continuation) in certain cases when
compiled with -pedantic.

We found the bug when using a very long write statement, with alternating
continuation lines of string literals and data. The bug does not appear if only
string literals are used.

The bug results in reporting the wrong line as the first invalid continuation
line (if there are indeed more than 39) or that there are too many (in the case
where there are 39 or fewer).

Thanks,
Jonathan.

Full test case:
[user@host] ~/bugs/gfortran-4.3/continuation  $ gfortran-4.3 -pedantic -o test
test.f90 
test.f90:23:

      "Line 15", &
1
Warning: Limit of 39 continuations exceeded in statement at (1)
[user@host] ~/bugs/gfortran-4.3/continuation  $ gfortran-4.3 -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --program-suffix=-4.3
Thread model: posix
gcc version 4.3.0 (GCC)
[user@host] ~/bugs/gfortran-4.3/continuation  $ cat test.f90
program test_mod
   implicit none

   integer, dimension(50) :: array

   array = 1

   print "(a, i8)", &
      "Line 1", &
      array(2), &
      "Line 3", &
      array(4), &
      "Line 5", &
      array(6), &
      "Line 7", &
      array(8), &
      "Line 9", &
      array(10), &
      "Line 11", &
      array(12), &
      "Line 13", &
      array(14), &
      "Line 15", &
      array(16), &
      "Line 17", &
      array(18), &
      "Line 19", &
      array(20), &
      "Line 21", &
      array(22), &
      "Line 23", &
      array(24), &
      "Line 25", &
      array(26), &
      "Line 27", &
      array(28), &
      "Line 29", &
      array(30), &
      "Line 31", &
      array(32), &
      "Line 33", &
      array(34), &
      "Line 35", &
      array(36), &
      "Line 37", &
      array(38), &
      "Line 39", &
      array(40), &
      "Line 41", &
      array(42), &
      "Line 43"
end program


-- 
           Summary: Miscounted continuation lines when interspersed with
                    data
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: J dot Hogg at rl dot ac dot uk
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

end of thread, other threads:[~2008-04-20 21:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-09  8:08 [Bug fortran/35882] New: Miscounted continuation lines when interspersed with data J dot Hogg at rl dot ac dot uk
2008-04-09  9:06 ` [Bug fortran/35882] " burnus at gcc dot gnu dot org
2008-04-09  9:19 ` burnus at gcc dot gnu dot org
2008-04-14  0:45 ` jvdelisle at gcc dot gnu dot org
2008-04-14  0:48 ` jvdelisle at gcc dot gnu dot org
2008-04-14  1:14 ` jvdelisle at gcc dot gnu dot org
2008-04-20 21:13 ` jvdelisle 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).