public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31627] -bounds-check doesn't check lower bound of assumed-sized array
2007-04-18 18:19 [Bug fortran/31627] New: -bounds-check doesn't check lower bound of assumed-sized array fxcoudert at gcc dot gnu dot org
@ 2007-04-18 18:19 ` fxcoudert at gcc dot gnu dot org
2007-05-04 20:32 ` fxcoudert at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-04-18 18:19 UTC (permalink / raw)
To: gcc-bugs
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Known to fail| |4.3.0
Last reconfirmed|0000-00-00 00:00:00 |2007-04-18 19:19:42
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31627
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/31627] New: -bounds-check doesn't check lower bound of assumed-sized array
@ 2007-04-18 18:19 fxcoudert at gcc dot gnu dot org
2007-04-18 18:19 ` [Bug fortran/31627] " fxcoudert at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-04-18 18:19 UTC (permalink / raw)
To: gcc-bugs
The following code should tell us we have an out-of-bounds access at runtime:
$ cat a.f90
subroutine foo(a)
integer a(*), i
i = 0
a(i) = 42
end subroutine foo
program test
integer x(42)
call foo(x)
end program test
$ gfortran a.f90 -fbounds-check && ./a.out
--
Summary: -bounds-check doesn't check lower bound of assumed-sized
array
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: fxcoudert at gcc dot gnu dot org
OtherBugsDependingO 27766
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31627
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/31627] -bounds-check doesn't check lower bound of assumed-sized array
2007-04-18 18:19 [Bug fortran/31627] New: -bounds-check doesn't check lower bound of assumed-sized array fxcoudert at gcc dot gnu dot org
2007-04-18 18:19 ` [Bug fortran/31627] " fxcoudert at gcc dot gnu dot org
@ 2007-05-04 20:32 ` fxcoudert at gcc dot gnu dot org
2007-05-22 9:27 ` fxcoudert at gcc dot gnu dot org
2007-05-22 9:28 ` [Bug fortran/31627] [4.1/4.2 only] " fxcoudert at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-05-04 20:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2007-05-04 21:32 -------
Created an attachment (id=13509)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13509&action=view)
Tentative patch for this bug
Not yet fully tested, nor regtested, but it should do the deed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31627
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/31627] -bounds-check doesn't check lower bound of assumed-sized array
2007-04-18 18:19 [Bug fortran/31627] New: -bounds-check doesn't check lower bound of assumed-sized array fxcoudert at gcc dot gnu dot org
2007-04-18 18:19 ` [Bug fortran/31627] " fxcoudert at gcc dot gnu dot org
2007-05-04 20:32 ` fxcoudert at gcc dot gnu dot org
@ 2007-05-22 9:27 ` fxcoudert at gcc dot gnu dot org
2007-05-22 9:28 ` [Bug fortran/31627] [4.1/4.2 only] " fxcoudert at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-05-22 9:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from fxcoudert at gcc dot gnu dot org 2007-05-22 10:27 -------
Subject: Bug 31627
Author: fxcoudert
Date: Tue May 22 09:27:15 2007
New Revision: 124940
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124940
Log:
PR fortran/31627
* trans-array.c (gfc_trans_array_bound_check): Take extra argument to
indicate whether we should check the upper bound in that dimension.
(gfc_conv_array_index_offset): Check only the lower bound of the
last dimension for assumed-size arrays.
(gfc_conv_array_ref): Likewise.
(gfc_conv_ss_startstride): Likewise.
* gfortran.dg/bounds_check_7.f90: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/bounds_check_7.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31627
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/31627] [4.1/4.2 only] -bounds-check doesn't check lower bound of assumed-sized array
2007-04-18 18:19 [Bug fortran/31627] New: -bounds-check doesn't check lower bound of assumed-sized array fxcoudert at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-05-22 9:27 ` fxcoudert at gcc dot gnu dot org
@ 2007-05-22 9:28 ` fxcoudert at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-05-22 9:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from fxcoudert at gcc dot gnu dot org 2007-05-22 10:28 -------
Fixed on mainline.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to fail|4.3.0 4.2.0 4.1.3 |4.2.0 4.1.3
Known to work| |4.3.0
Resolution| |FIXED
Summary|-bounds-check doesn't check |[4.1/4.2 only] -bounds-check
|lower bound of assumed-sized|doesn't check lower bound of
|array |assumed-sized array
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31627
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-05-22 9:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-18 18:19 [Bug fortran/31627] New: -bounds-check doesn't check lower bound of assumed-sized array fxcoudert at gcc dot gnu dot org
2007-04-18 18:19 ` [Bug fortran/31627] " fxcoudert at gcc dot gnu dot org
2007-05-04 20:32 ` fxcoudert at gcc dot gnu dot org
2007-05-22 9:27 ` fxcoudert at gcc dot gnu dot org
2007-05-22 9:28 ` [Bug fortran/31627] [4.1/4.2 only] " fxcoudert 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).