public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "J dot Hogg at rl dot ac dot uk" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/35882]  New: Miscounted continuation lines when interspersed with data
Date: Wed, 09 Apr 2008 08:08:00 -0000	[thread overview]
Message-ID: <bug-35882-15996@http.gcc.gnu.org/bugzilla/> (raw)

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


             reply	other threads:[~2008-04-09  8:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-09  8:08 J dot Hogg at rl dot ac dot uk [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-35882-15996@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).