This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/39195] [Bounds check] Illegal empty array argument not detected at compile or runtime
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Feb 2009 09:46:18 -0000
- Subject: [Bug fortran/39195] [Bounds check] Illegal empty array argument not detected at compile or runtime
- References: <bug-39195-14178@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2009-02-15 09:46 -------
None of my compilers prints a compile-time diagnostic, however, with (only) NAG
f95 it correctly prints:
Actual argument for dummy array X too small -
0 elements instead of 192
* * *
This bug seems to be a variant of PR 32317 or PR 27989. Remark in the latter:
"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."
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |27766
nThis| |
GCC host triplet|x86_64-unknown-linux-gnu |
Keywords| |diagnostic
Summary|Illegal empty array argument|[Bounds check] Illegal empty
|not detected at compile or |array argument not detected
|runtime |at compile or runtime
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39195