public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/27989] New: -fbounds-check should check for too small arrays on subroutine calls
@ 2006-06-11 13:10 tobias dot burnus at physik dot fu-berlin dot de
2006-06-11 20:28 ` [Bug fortran/27989] " tobias dot burnus at physik dot fu-berlin dot de
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: tobias dot burnus at physik dot fu-berlin dot de @ 2006-06-11 13:10 UTC (permalink / raw)
To: gcc-bugs
This is with GNU Fortran 95 (GCC) 4.2.0 20060608 (experimental) and 4.1.0 (SUSE
Linux).
The following program has a problem as the passed array is shorter than the
array expected by the subroutine. Currently, gfortran does not detect this
problem.
Expected: Something like
Actual argument for dummy array A too small - 3 elements instead of 5
(this is the NAG -C=all output)
----------<cut>-----------
program test
implicit none
real :: b(3)
b = 42.0
call sub(5,b)
end program test
subroutine sub(n,a)
implicit none
integer, intent(in) :: n
real, intent(in) :: a(n)
print *,a
end subroutine sub
-------<cut>----------------
--
Summary: -fbounds-check should check for too small arrays on
subroutine calls
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tobias dot burnus at physik dot fu-berlin dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27989
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/27989] -fbounds-check should check for too small arrays on subroutine calls
2006-06-11 13:10 [Bug fortran/27989] New: -fbounds-check should check for too small arrays on subroutine calls tobias dot burnus at physik dot fu-berlin dot de
@ 2006-06-11 20:28 ` tobias dot burnus at physik dot fu-berlin dot de
2006-09-10 19:23 ` tobias dot burnus at physik dot fu-berlin dot de
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: tobias dot burnus at physik dot fu-berlin dot de @ 2006-06-11 20:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tobias dot burnus at physik dot fu-berlin dot de 2006-06-11 20:05 -------
This should probably marked as blocking -fbounds-check meta bug 27786.
--
tobias dot burnus at physik dot fu-berlin dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27989
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/27989] -fbounds-check should check for too small arrays on subroutine calls
2006-06-11 13:10 [Bug fortran/27989] New: -fbounds-check should check for too small arrays on subroutine calls tobias dot burnus at physik dot fu-berlin dot de
2006-06-11 20:28 ` [Bug fortran/27989] " tobias dot burnus at physik dot fu-berlin dot de
@ 2006-09-10 19:23 ` tobias dot burnus at physik dot fu-berlin dot de
2007-02-16 16:08 ` fxcoudert at gcc dot gnu dot org
2010-05-19 17:53 ` dfranke at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: tobias dot burnus at physik dot fu-berlin dot de @ 2006-09-10 19:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tobias dot burnus at physik dot fu-berlin dot de 2006-09-10 19:23 -------
Maybe this should not be done with -fbounds-check, but put into a different
option. (NAG uses not -C=array but -C=call for this.)
The reason is that some programs (e.g. Exciting.sf.net) passes an array(n-1) to
a subroutine foo(n,b) with "real :: b(n)" but only accesses the first n-1
elements.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27989
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/27989] -fbounds-check should check for too small arrays on subroutine calls
2006-06-11 13:10 [Bug fortran/27989] New: -fbounds-check should check for too small arrays on subroutine calls tobias dot burnus at physik dot fu-berlin dot de
2006-06-11 20:28 ` [Bug fortran/27989] " tobias dot burnus at physik dot fu-berlin dot de
2006-09-10 19:23 ` tobias dot burnus at physik dot fu-berlin dot de
@ 2007-02-16 16:08 ` fxcoudert at gcc dot gnu dot org
2010-05-19 17:53 ` dfranke at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-02-16 16:08 UTC (permalink / raw)
To: gcc-bugs
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-02-16 16:07:45
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27989
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/27989] -fbounds-check should check for too small arrays on subroutine calls
2006-06-11 13:10 [Bug fortran/27989] New: -fbounds-check should check for too small arrays on subroutine calls tobias dot burnus at physik dot fu-berlin dot de
` (2 preceding siblings ...)
2007-02-16 16:08 ` fxcoudert at gcc dot gnu dot org
@ 2010-05-19 17:53 ` dfranke at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-19 17:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dfranke at gcc dot gnu dot org 2010-05-19 17:53 -------
*** Bug 30939 has been marked as a duplicate of this bug. ***
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27989
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-19 17:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-11 13:10 [Bug fortran/27989] New: -fbounds-check should check for too small arrays on subroutine calls tobias dot burnus at physik dot fu-berlin dot de
2006-06-11 20:28 ` [Bug fortran/27989] " tobias dot burnus at physik dot fu-berlin dot de
2006-09-10 19:23 ` tobias dot burnus at physik dot fu-berlin dot de
2007-02-16 16:08 ` fxcoudert at gcc dot gnu dot org
2010-05-19 17:53 ` dfranke 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).