public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/32315]  New: DATA with implied-do: Bounds checks missing
Date: Wed, 13 Jun 2007 06:25:00 -0000	[thread overview]
Message-ID: <bug-32315-13404@http.gcc.gnu.org/bugzilla/> (raw)

Found at:
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/34f509b6b4241c6d/

program chkdata
    character(len=20), dimension(4) :: string
    data ( string(i) ,i=1,5 ) / &
        'A', 'B', 'C', 'D', 'E' /
    write(*,*) string
end program chkdata

gfortran gives no warning/error whereas NAG f95 rejects it with:
  Error line 5: First subscript (5) is greater than upper bound (4)
  for array STRING
and g95 rejects it with:
  Error: Out of bounds array reference at (1)
and sunf95 with:
  ERROR: The upper bound for dimension 1 of the array STRING is out of range.

(ifort does the same as gfortran: It accepts it.)


-- 
           Summary: DATA with implied-do: Bounds checks missing
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: accepts-invalid, 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=32315


             reply	other threads:[~2007-06-13  6:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-13  6:25 burnus at gcc dot gnu dot org [this message]
2007-06-13  6:46 ` [Bug fortran/32315] " burnus at gcc dot gnu dot org
2007-06-13 20:51 ` fxcoudert at gcc dot gnu dot org
2007-06-14  6:43 ` burnus at gcc dot gnu dot org
2008-01-20 11:56 ` [Bug fortran/32315] DATA with implied-do: Bounds checks missing [regression vs. g77] tkoenig at gcc dot gnu dot org
2008-02-05  9:37 ` pault at gcc dot gnu dot org
2008-02-05 11:18 ` pault at gcc dot gnu dot org
2008-02-05 13:07 ` pault 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-32315-13404@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).