public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/30802] out of bounds error array I/O not picked up with -fbounds-check
Date: Mon, 17 Dec 2007 22:23:00 -0000	[thread overview]
Message-ID: <20071217222312.29120.qmail@sourceware.org> (raw)
In-Reply-To: <bug-30802-14089@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from tkoenig at gcc dot gnu dot org  2007-12-17 22:23 -------
I think the problem is that we don't insert bounds checking
in gfc_conv_expr_descriptor.

Another test case:

$ cat index.f90 
module bar
contains
  subroutine foo(a)
  real, dimension(:) :: a
  a = 3.
  end subroutine foo
end module bar
program main
  use bar
  real, dimension(2,2) :: a
  n = 3
  call foo(a(n,:))
end program main
$ gfortran index.f90 
$ gfortran -fbounds-check index.f90 
$ ./a.out


-- 


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


  parent reply	other threads:[~2007-12-17 22:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-15  0:28 [Bug fortran/30802] New: out of bounds error in allocatable array " glv at maths dot otago dot ac dot nz
2007-02-15  0:53 ` [Bug fortran/30802] " fxcoudert at gcc dot gnu dot org
2007-03-07  7:23 ` burnus at gcc dot gnu dot org
2007-05-09  7:09 ` fxcoudert at gcc dot gnu dot org
2007-08-06 21:13 ` fxcoudert at gcc dot gnu dot org
2007-12-08 18:07 ` [Bug fortran/30802] out of bounds error array I/O " fxcoudert at gcc dot gnu dot org
2007-12-17 22:23 ` tkoenig at gcc dot gnu dot org [this message]
2010-04-18 15:31 ` jvdelisle at gcc dot gnu dot org
     [not found] <bug-30802-4@http.gcc.gnu.org/bugzilla/>
2020-10-28 20:27 ` anlauf at gcc dot gnu.org
2023-09-14 19:44 ` anlauf at gcc dot gnu.org
2023-09-14 20:23 ` anlauf at gcc dot gnu.org
2023-09-15 17:14 ` cvs-commit at gcc dot gnu.org
2023-09-15 18:21 ` anlauf at gcc dot gnu.org
2023-09-15 19:06 ` anlauf at gcc dot gnu.org
2024-03-21 17:56 ` cvs-commit at gcc dot gnu.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=20071217222312.29120.qmail@sourceware.org \
    --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).